hbase shell常用命令總結
輸入help命令看所有命令及分組情況。
1.當前使用者
whoami
2.看hbase伺服器狀態
status
3.看hbase版本
version
4.列出所有的表
list
5.建立表,可使用create help命令看建立案列
create 't1','cl1','cl2','cl3'
說明:表名t1,三個列族cl1,cl2,cl3
6.檢視錶詳細資訊
describe 't1'
7.使表可用不可用。
enable 't1'------t1可用
disable 't1'-----t1不可用(刪除表前需要此命令)
8.刪除表,先disable,再delete。否則報錯。
disable 't1'
drop 't1'
9.刪除某個列族
alter 't1',{NAME=>'cl2',METHOD=>'delete'}
10.看錶是否存在
exists 't1'
11.看錶是否可用
is_enabled 't1'
is_disabled 't1'
12.增加列族
alter 't1',{NAME=>'cl1'}
13.插入資料
put 't1','row1','cl1:age','24'
put 't1','row1','cl1:name','zhangsan'
put 't1','row1','cl2:sex','male'
put 't1','row1','cl3:salary','9000'
put 't1','row2','cl1:age','28'
put 't1','row2','cl1:name','lisi'
put 't1','row2','cl2:sex','male'
put 't1','row2','cl3:salary','10000'
put 't1','row3','cl1:age','34'
put 't1','row3','cl1:name','zhaoliu'
put 't1','row3','cl2:sex','female'
put 't1','row3','cl3:salary','19000'
14.查詢資料
14.1.全部資料(全表掃描)
scan 't1'
14.2.某行id資料
get 't1','row1'
14.3.某行id指定列族資料
get 't1','row1','cl1'
14.4.某行id指定列族指定列資料
get 't1','row1','cl1:age'
15.修改資料
put 't1','row1','cl1:age','88'
16.刪除整行
deleteall 't1','row1'
17.刪除行id中某列族的某列
delete 't1','row2','cl1:age'
18.統計表中記錄行數
count 't1'
19.清空表中資料
truncate 't1'
1.當前使用者
whoami
2.看hbase伺服器狀態
status
3.看hbase版本
version
4.列出所有的表
list
5.建立表,可使用create help命令看建立案列
create 't1','cl1','cl2','cl3'
說明:表名t1,三個列族cl1,cl2,cl3
6.檢視錶詳細資訊
describe 't1'
7.使表可用不可用。
enable 't1'------t1可用
disable 't1'-----t1不可用(刪除表前需要此命令)
8.刪除表,先disable,再delete。否則報錯。
disable 't1'
drop 't1'
9.刪除某個列族
alter 't1',{NAME=>'cl2',METHOD=>'delete'}
10.看錶是否存在
exists 't1'
11.看錶是否可用
is_enabled 't1'
is_disabled 't1'
12.增加列族
alter 't1',{NAME=>'cl1'}
13.插入資料
put 't1','row1','cl1:age','24'
put 't1','row1','cl1:name','zhangsan'
put 't1','row1','cl2:sex','male'
put 't1','row1','cl3:salary','9000'
put 't1','row2','cl1:age','28'
put 't1','row2','cl1:name','lisi'
put 't1','row2','cl2:sex','male'
put 't1','row2','cl3:salary','10000'
put 't1','row3','cl1:age','34'
put 't1','row3','cl1:name','zhaoliu'
put 't1','row3','cl2:sex','female'
put 't1','row3','cl3:salary','19000'
14.查詢資料
14.1.全部資料(全表掃描)
scan 't1'
14.2.某行id資料
get 't1','row1'
14.3.某行id指定列族資料
get 't1','row1','cl1'
14.4.某行id指定列族指定列資料
get 't1','row1','cl1:age'
15.修改資料
put 't1','row1','cl1:age','88'
16.刪除整行
deleteall 't1','row1'
17.刪除行id中某列族的某列
delete 't1','row2','cl1:age'
18.統計表中記錄行數
count 't1'
19.清空表中資料
truncate 't1'
相關文章
- hbase之 Hbase shell 常用命令
- Hbase shell 常用命令1
- hbase - [03] 客戶端常用命令(hbase shell)客戶端
- MongoDB shell常用命令總結MongoDB
- Hbase shell 常用命令筆記筆記
- hbase基本概念和hbase shell常用命令用法
- Java操作hbase總結Java
- shell總結
- hbase shell命令
- HBase知識點總結
- HBase 系列(五)——HBase常用 Shell 命令
- Hbase - 常用命令
- SHell命令總結
- HBase 常用Shell命令
- HBase知識點集中總結
- HBase 過濾器使用總結過濾器
- HBase的理論性總結
- HBase二級索引方案總結索引
- Shell 括號總結
- SHELL字串使用總結字串
- Hbase shell的基本操作
- HBASE的SHELL命令操作
- HBase shell 命令介紹
- hbase shell 基本操作命令
- Docker 常用命令總結Docker
- node 常用命令總結
- Kafka 常用命令總結Kafka
- Git常用命令總結Git
- docker常用命令總結Docker
- solr常用命令總結Solr
- Git 常用命令總結Git
- MySql常用命令總結MySql
- Hive常用命令總結Hive
- Shell總結01-Shell直譯器
- Linux shell命令總結Linux
- shell學習總結-4
- shell學習總結-1
- shell學習總結-2