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

  • 相关阅读:
    UI: 操作导航控制器的视图控制器数组
    UI: 使用 UIViewController 展现和管理视图
    UI: 使用 UINavigationController 实现导航
    UI: 使用 UIActivityViewController 显示分享选项
    UI: 使用 UIActivityViewController 显示分享选项
    UI: 自定义 UISegmentedControl
    UI: UISegmentedControl 做简单选项分组及其自定义
    UI: UISlider 实现指定范围值的选择
    隧道目标识别实验过程(二)标准VOC数据集和制作后的数据集实验结果对比
    隧道目标识别实验过程(一)数据集的制作
  • 原文地址:https://www.cnblogs.com/likai198981/p/3466015.html
Copyright © 2011-2022 走看看