HBase shell命令行
啟動Shell ? ?$ hbase shell
列出所有的表 ? hbase > ?list
創建名為mytable的表,含有一個列族hb ? ?hbase > create 'mytable' , 'hb'
?在‘mytable’表的'first'行中的‘hb:data’列對應的數據單元中插入字節數組‘hello HBase’
??hbase > put ?'mytable' , 'first' , 'hb:data' , 'hello HBase'?
put ?'mytable' , 'first' , 'hb:name' , 'whq'?
put ?'mytable' , 'second' , 'hb:name' , 'whq2'?
put ?'mytable' , 'second' , 'hb:data' , 'hello my test'?
更新數據
put ?'mytable' , 'second' , 'hb:data' , 'hello my update'
讀取mytable表 ‘first’行的內容 ??hbase > get 'mytable' , 'first'?
get 'mytable' , 'second'?
讀取mytable表所有的內容 ? ???hbase > scan 'mytable'?
?
刪除mytable表 ‘first’行 hbase> delete 'mytable' , 'first'?
?
?
總結
以上是生活随笔為你收集整理的HBase shell命令行的全部內容,希望文章能夠幫你解決所遇到的問題。