Hbase shell操作(完整版記錄)

來源:互聯網
上載者:User

標籤:hbase shell操作大全   hbase   shell操作   

1.進入Hbase命令列

>hbase shell

退出命令列

>quit

2.建立表

>create 'users','user_id','address','info'

3.查看所有表

>list

4.查看錶結構

>describe 'users'

5.刪除表:

>disable 'users'>drop 'users'

6.新增資料

>put 'users','xiaowang','info:age','26'>put 'users','xiaoming','address:city','beijing'>put 'users','xiaowang','address:city','shagnhai'

7.修改資料

>put 'users','xiaoming','info:age','27'

8.擷取row資訊

>get 'users','xiaoming'


9.擷取column資訊

>get 'users','xiaoming','info:age'

10.擷取column versions資訊(建表時不指定預設儲存3個版本的資料)

>get 'users','xiaoming',{COLUMN='info:age',VERSIONS=>3}


11.擷取column某個版本的資料(TIMESTAMP為插入式指定目前時間戳)

>get 'users','xiaoming',{COLUMN='info:age',TIMESTAMP=>15134937056}

12.全表掃描

>scan 'users'

13.刪除column

>delete 'users','xiaoming','info:age'

14.刪除row

>deleteall 'users','xiaowang'

15.統計行數

>count 'users'

16.清空表

>truncate 'users'





我的個人網站:http://www.caicongyang.com ;

我的CSDN部落格地址: http://blog.csdn.net/caicongyang ;





Hbase shell操作(完整版記錄)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.