Hbase查看数据库状态相关命令函数
使用hbase shell可以进入一个shell命令行界面!
[hadoop@hadoop102 HBase]$ bin/HBase shell
1. 查看集群状态
使用status可以查看集群状态,默认为summary,可以选择‘simple’和‘detailed’来查看详情。
hbase(main):011:0> status
1 active master, 0 backup masters, 3 servers, 0 dead, 0.6667 average load
2. 查看版本
hbase(main):002:0> version
1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017
3. 查看操作用户及组信息
hbase(main):003:0> whoami
atguigu (auth:SIMPLE)
groups: atguigu
4. 查看表操作信息
hbase(main):004:0> table_help
Help for table-reference commands.
5. 查看帮助信息
hbase(main):005:0> help
HBase Shell, version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017
Type 'help "COMMAND"', (e.g. 'help "get"' -- the quotes are necessary) for help on a specific command.
Commands are grouped. Type 'help "COMMAND_GROUP"', (e.g. 'help "general"') for help on a command group.
6. 查看具体命令的帮助
hbase(main):006:0> help 'get'
Get row or cell contents; pass table name, row, and optionally
a dictionary of column(s), timestamp, timerange and versions. Examples:
hbase> get 'ns1:t1', 'r1'
注意引号是必须的!