airfling 2019-12-22
hbase shell
进入Shell环境create ‘t1‘, {NAME => ‘f1‘, VERSIONS => 5}
创建表t1,列族f1,列族版本号为5create ‘t1‘, {NAME => ‘f1‘}, {NAME => ‘f2‘}, {NAME => ‘f3‘}
创建表t1,三个列族,或则使用命令代替create ‘t1‘, ‘f1‘, ‘f2‘, ‘f3‘
list
列出HBase所有的表信息put ‘t1‘, ‘row1‘, ‘f1:c1‘, ‘value1‘, 1421822284898
向表中t1中行row1和列f1:c1对应的单元格中添加数据value1,时间戳为后面那串数字。get
用来获取数据scan
用来浏览表alter
修改列族模式alter ‘t1‘, NAME => ‘f1‘
向表t1中添加列族f1alter ‘t1‘, NAME => ‘f1‘ METHOD => ‘delete‘
删除表中列f1count
统计表中行数describe ‘t1‘
显示表的相关信息drop
删除表shutdown
关闭集群