hbase shell表结构管理
Posted 装逼是个坑,越陷越深
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hbase shell表结构管理相关的知识,希望对你有一定的参考价值。
hbase表定义指令详细解说篇
1. alter, alter_async, alter_status
2. create
3. describe (可以简写成\'desc\') 显示某张表的结构情况
hbase(main):026:0> help \'describe\'
1 Describe the named table. For example: 2 hbase> describe \'t1\' 3 hbase> describe \'ns1:t1\' 4 5 Alternatively, you can use the abbreviated \'desc\' for the same thing. 6 hbase> desc \'t1\' 7 hbase> desc \'ns1:t1\'
1 hbase(main):029:0> desc \'noc\' 2 Table noc is ENABLED 3 noc 4 COLUMN FAMILIES DESCRIPTION 5 {NAME => \'c\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOC 6 K_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'SNAPPY\', MIN_VERSIONS => \'0\', BLOCKCACHE => \'true\', BLOCKSI 7 ZE => \'65536\', REPLICATION_SCOPE => \'1\'} 8 1 row(s) in 0.0900 seconds
4. disable, disable_all, is_disabled
5. drop, drop_all
6. enable, enable_all, is_enabled
7. exists
8. get_table
9. list (列出所有的table,可以通过模式匹配进行过滤,注意进行模式匹配的地方使用\'.*\')
hbase(main):030:0> help \'list\'
1 List all tables in hbase. Optional regular expression parameter could 2 be used to filter the output. Examples: 3 4 hbase> list 5 hbase> list \'abc.*\' 6 hbase> list \'ns:abc.*\' 7 hbase> list \'ns:.*\'
1 hbase(main):031:0> list #显示所有的table 2 TABLE 3 cdr 4 noc 5 2 row(s) in 0.0070 seconds 6 7 => ["cdr", "noc"] 8 hbase(main):032:0> list \'c.*\' #显示以c开头的table 9 TABLE 10 cdr 11 1 row(s) in 0.0020 seconds 12 13 => ["cdr"] 14 hbase(main):033:0> list \'c*\' #这样做得不到想要的结果 15 TABLE 16 0 row(s) in 0.0010 seconds 17 18 => [] 19 hbase(main):034:0> list \'default:.*\' #显示namespace为default的table 20 TABLE 21 cdr 22 noc 23 2 row(s) in 0.0010 seconds
10. locate_region
11. show_filters
正在编辑中
以上是关于hbase shell表结构管理的主要内容,如果未能解决你的问题,请参考以下文章