Hbase 简明教程

HBase - General Commands

HBase 中的常用命令包括状态、版本、table_help 和 whoami。本章解释了这些命令。

The general commands in HBase are status, version, table_help, and whoami. This chapter explains these commands.

status

该命令返回系统状态,包括在系统上运行的服务器的详细信息。其语法如下:

This command returns the status of the system including the details of the servers running on the system. Its syntax is as follows:

hbase(main):009:0> status

如果你执行该命令,则会返回以下输出。

If you execute this command, it returns the following output.

hbase(main):009:0> status
3 servers, 0 dead, 1.3333 average load

version

该命令返回你的系统中使用的 HBase 版本。其语法如下:

This command returns the version of HBase used in your system. Its syntax is as follows:

hbase(main):010:0> version

如果你执行该命令,则会返回以下输出。

If you execute this command, it returns the following output.

hbase(main):009:0> version
0.98.8-hadoop2, r6cfc8d064754251365e070a10a82eb169956d5fe, Fri Nov 14
18:26:29 PST 2014

table_help

该命令指导你如何使用表引用命令以及使用什么表引用命令。以下提供了该命令的语法。

This command guides you what and how to use table-referenced commands. Given below is the syntax to use this command.

hbase(main):02:0> table_help

当使用该命令时,它会显示与表相关的命令的帮助主题。以下提供了该命令的部分输出。

When you use this command, it shows help topics for table-related commands. Given below is the partial output of this command.

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 用户,如下所示。

This command returns the user details of HBase. If you execute this command, returns the current HBase user as shown below.

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