開發者學堂課程【分布式資料庫 HBase快速入門:HBase Shell 操作】學習筆記,與課程緊密聯系,讓使用者快速學習知識。
課程位址:
https://developer.aliyun.com/learning/course/101/detail/1784HBase Shell 操作
内容簡介
一、HBase Shell操作
一、HBase Shell 操作
1.掃描檢視表資料
hbase ( main ):008:0> scan
”student”
hbase ( main ):009:0> scan
“student” , {SТARTROW=>& “1001” , STOPROW=>
“1001”}
hbase ( main ):010:0> scan
“student” , {STARTROW=>"1001 ” }
2.檢視表結構
hbase ( main ):011:0> describe
3.更新指定字段的資料
hbase (main ):012:0> put
“student “ , “1001" , “info : name”, “ Nick”
hbase ( main ):013:0> put
“student “ ,”1001” , “ info : age” , “100”
4.檢視“指定行”或“指定列族;列的資料
hbase ( main ):014:0> get
“student “ , “1001”
hbase ( main ):015:0> get
“student “ , “1001” , “info : name “
5.統計表資料行數
hbase ( main ):021:0> count
“student”
6.制除資料
删除某rowkey 的全部資料
hbase (main ):016:0>deleteal1
“student “ , “1001”
删除某 rowkey 的某一列資料:
hbase ( main ):017:0> delete “ student “ , “1002” , “ info :sех”
7.清空表資料
hbase ( main ):018:0> truncate
“student “
提示:清空表的操作順序為先 disable ,然後再 truncate