zoukankan      html  css  js  c++  java
  • HBase Cli相关操作

    修改HBase表结构之前首先需要disable表,然后进行更改相关表结构信息,最后enable表,如下

    1. 动态添加一个或多个列簇

    hbase(main):034:0> describe 'HiddenIPInfo'
    DESCRIPTION                                                                   ENABLED                                   
     'HiddenIPInfo', {NAME => 'IPAddress', DATA_BLOCK_ENCODING => 'NONE', BLOOMFI true                                      
     LTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'N                                           
     ONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false                                           
     ', BLOCKSIZE => '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', BLO                                           
     CKCACHE => 'true'}      

    hbase(main):024:0> disable 'HiddenIPInfo'
    0 row(s) in 4.9910 seconds

    hbase(main):025:0> alter 'HiddenIPInfo','Address','family1','family2'......(添加一个or多个列簇
    Updating all regions with the new schema...
    1/1 regions updated.
    Done.
    0 row(s) in 2.5730 seconds

    hbase(main):026:0> enable 'HiddenIPInfo'
    0 row(s) in 3.0570 seconds

    hbase(main):027:0> describe 'HiddenIPInfo'
    DESCRIPTION                                                                   ENABLED                                   
     'HiddenIPInfo', {NAME => 'Address', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILT true                                      
     ER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS => '                                           
     3', TTL => '2147483647', MIN_VERSIONS => '0', KEEP_DELETED_CELLS => 'false',                                           
      BLOCKSIZE => '65536', ENCODE_ON_DISK => 'true', IN_MEMORY => 'false', BLOCK                                           
     CACHE => 'true'}, {NAME => 'IPAddress', DATA_BLOCK_ENCODING => 'NONE', BLOOM                                           
     FILTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION =>                                            
     'NONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'fal                                           
     se', BLOCKSIZE => '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', B                                           
     LOCKCACHE => 'true'}      

    1. 动态删除一个(only 1)列簇(若删除多个列簇,需逐个删除)

    hbase(main):031:0> disable 'HiddenIPInfo'
    0 row(s) in 1.6290 seconds

    hbase(main):032:0> alter 'HiddenIPInfo','delete' => 'Address'
    Updating all regions with the new schema...
    1/1 regions updated.
    Done.
    0 row(s) in 1.8950 seconds

    hbase(main):033:0> enable 'HiddenIPInfo'
    0 row(s) in 1.5700 seconds

    hbase(main):034:0> describe 'HiddenIPInfo'
    DESCRIPTION                                                                   ENABLED                                   
     'HiddenIPInfo', {NAME => 'IPAddress', DATA_BLOCK_ENCODING => 'NONE', BLOOMFI true                                      
     LTER => 'NONE', REPLICATION_SCOPE => '0', VERSIONS => '3', COMPRESSION => 'N                                           
     ONE', MIN_VERSIONS => '0', TTL => '2147483647', KEEP_DELETED_CELLS => 'false                                           
     ', BLOCKSIZE => '65536', IN_MEMORY => 'false', ENCODE_ON_DISK => 'true', BLO                                           
     CKCACHE => 'true'}                                                                                                     
    1 row(s) in 0.1390 seconds

  • 相关阅读:
    CMDXP.CMD命令大全
    ASP.NET 页生命周期概述
    使用 ASP.NET 2.0提供的WebResource管理资源
    软件包管理 之 Fedora / Redhat 软件包管理指南
    开源代码分析研究 之 BugNet (2008年1月14日更新 第一章BugNet 简介 已完成)
    软件包管理 之 如何编译安装源码包软件
    硬件管理 之 Linux 硬件管理的基础知识
    软件包管理 之 fedorarpmdevtools 工具介绍
    软件包管理 之 Fedora/Redhat 在线安装更新软件包,yum 篇 ── 给新手指南
    系统引导管理 之 系统引导过程及硬盘分区结构论述
  • 原文地址:https://www.cnblogs.com/likai198981/p/3466015.html
Copyright © 2011-2022 走看看