hbase shell 操作

来源:互联网 发布:美图都有什么软件 编辑:程序博客网 时间:2024/05/17 21:39

注意

1: 区分大小写

2: 单引号、双引号

常用命令

1: list ---》显示表

2:describe 'siteplatform_wwj'  查看表结构,这里能看到表的列族

3:查询表是否存在: exists 'siteplatform'

4:create tablename1 ,{describe 列族的结果}

5:put 'table1', 'row1', 'column1', 'value', time1  put数据

6:scan 't1', {FILTER => "(PrefixFilter ('row2') AND  (QualifierFilter (>=, 'binary:xyz'))) OR  (TimestampsFilter ( 123, 456))"}

7:scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz',STOPROW=>"zzz"}

8:get 't1', 'r1', {COLUMN =>[ 'c1','c2'], TIMESTAMP => ts1, VERSIONS => 4} 

9:删除表:a:disable '表名称' b:drop '表名称'

10:删除一个列族: a:disable '表名称' b: alter 'member',{NAME=>'member_id',METHOD=>'delete'}

其它操作

1.查询服务器状态

2.查询hbase、hive版本


 


0 0
原创粉丝点击