HBase常用命令status, version, table_help和whoami。本章将介绍了这些命令。
status
命令返回包括在系统上运行的服务器的细节和系统的状态。它的语法如下:
hbase(main):009:0> status
如果执行这个命令,它会返回下面的输出
hbase(main):009:0> status 3 servers, 0 dead, 1.3333 average load
version
该命令返回HBase系统使用的版本。它的语法如下:
hbase(main):010:0> version
如果执行这个命令,它会返回下面的输出。
hbase(main):009:0> version 0.98.8-hadoop2, r6cfc8d064754251365e070a10a82eb169956d5fe, Fri Nov 14 18:26:29 PST 2014
table_help
此命令将引导如何使用表引用的命令。下面给出的是使用这个命令的语法。
hbase(main):02:0> table_help
当使用此命令时,它显示帮助主题表相关的命令。下面给出是此命令的部分输出。
hbase(main):002:0> table_help Help for table-reference commands. You can either create a table via &aposcreate&apos and then manipulate the table via commands like &aposput&apos, &aposget&apos, etc. See the standard help information for how to use each of these commands. However, as of 0.96, you can also get a reference to a table, on which you can invoke commands. For instance, you can get create a table and keep around a reference to it via: hbase> t = create &apost&apos, &aposcf&apos…...
whoami
该命令返回HBase用户详细信息。如果执行这个命令,返回当前HBase用户,如下图所示
hbase(main):008:0> whoami hadoop (auth:SIMPLE) groups: hadoop