Created
March 9, 2010 05:10
-
-
Save kovyrin/326239 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/work/git/hbase (HBASE-2279) | |
[00:06] $ ./bin/hbase shell | |
HBase Shell; enter 'help<RETURN>' for list of supported commands. | |
Type "exit<RETURN>" to leave the HBase Shell | |
Version: 0.21.0-SNAPSHOT, rUnknown, Wed Mar 3 13:39:18 EST 2010 | |
hbase(main):001:0> help | |
There are few groups of commands in Hbase | |
Use help 'group_name' (e.g. help 'general') to get help on all commands in a group | |
Use help 'command' (e.g. help 'get') to get help on a specific command | |
-------------------------------------------------------------------------------- | |
Here is the list of groups with their commands: | |
GENERAL HBASE SHELL COMMANDS: | |
group name: general | |
commands: status, version | |
TABLES MANAGEMENT COMMANDS: | |
group name: ddl | |
commands: alter, create, describe, disable, drop, enable, exists, list | |
DATA MANIPULATION COMMANDS: | |
group name: dml | |
commands: count, delete, deleteall, get, incr, put, scan, truncate | |
HBASE SURGERY TOOLS: | |
group name: tools | |
commands: close_region, compact, disable_region, enable_region, flush, major_compact, shutdown, split, zk, zk_dump | |
-------------------------------------------------------------------------------- | |
GENERAL NOTES: | |
Quote all names in the hbase shell such as table and column names. Don't | |
forget commas delimit command parameters. Type <RETURN> after entering a | |
command to run it. Dictionaries of configuration used in the creation and | |
alteration of tables are ruby Hashes. They look like this: | |
{'key1' => 'value1', 'key2' => 'value2', ...} | |
They are opened and closed with curley-braces. Key/values are delimited by | |
the '=>' character combination. Usually keys are predefined constants such as | |
NAME, VERSIONS, COMPRESSION, etc. Constants do not need to be quoted. Type | |
'Object.constants' to see a (messy) list of all constants in the environment. | |
In case you are using binary keys or values and need to enter them into the | |
shell then use double-quotes to make use of hexadecimal for example: | |
hbase> get 't1', "key\x03\x3f\xcd" | |
hbase> get 't1', "key\003\023\011" | |
hbase> put 't1', "test\xef\xff", 'f1:', "\x01\x33\x40" | |
Using the double-quote notation you can directly use the values output by the | |
shell for example during a "scan" call. | |
This HBase shell is the JRuby IRB with the above HBase-specific commands added. | |
For more on the HBase Shell, see http://wiki.apache.org/hadoop/Hbase/Shell | |
hbase(main):002:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment