HBase shell窗口进入
执行命令hbase shell
HBase表的创建
# 语法:create <table>, {NAME => <family>, VERSIONS => <VERSIONS>}
# 例如:创建表t1,有两个family name:f1,f2,且版本数前者为3,后者为1
hbase(main)> create 't1',{NAME => 'f1', VERSIONS => 3},{NAME => 'f2', VERSIONS => 1}
create 'subject_test_h2h', {NAME => 'cf1', BLOOMFILTER => 'ROW', VERSIONS => '20', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', COMPRESSION => 'SNAPPY', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'},SPLITS=>['1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']
HBase表的删除
- disable表
- drop表
hbase(main)> disable 't1'
hbase(main)> drop 't1'
HBase表的清空
hbase(main)> truncate 't1'
HBase表查看
desc "t1" 查看表
HBase查看列表
list
HBase统计某张表数据
count "t1"