HBase - 常規命令



HBase 中的常規命令為狀態、版本、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 'create' and then manipulate the table
via commands like 'put', 'get', 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 't', 'cf'…...

whoami

此命令返回 HBase 的使用者資訊。如果您執行此命令,則會返回當前 HBase 使用者,如下所示。

hbase(main):008:0> whoami
hadoop (auth:SIMPLE)
groups: hadoop
廣告