开发者学堂课程【分布式数据库 HBase快速入门:HBase Shell 操作】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/101/detail/1784
HBase 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