HBase教程

HBase 一般命令

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 '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
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4