Groups
of commands and explanation :
- General Commands:
- status : Shows server status, example1 servers, 0 dead, 10.0000 average load
- version : Shows version of hbase0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011
- DDL Commands:
- alter : Using this commmand you can alter the table
Alter column
family schema; pass table name and a dictionary
specifying new
column family schema. Dictionaries are described
on the main help
command output. Dictionary must include name
of column family
to alter. For example,
To change or add
the 'f1' column family in table 't1' from defaults
to instead keep a
maximum of 5 cell VERSIONS, do:
hbase> alter
't1', NAME => 'f1', VERSIONS => 5
To delete the 'f1'
column family in table 't1', do:
hbase> alter
't1', NAME => 'f1', METHOD => 'delete'
or a shorter
version:
hbase> alter
't1', 'delete' => 'f1'
You can also
change table-scope attributes like MAX_FILESIZE
MEMSTORE_FLUSHSIZE,
READONLY, and DEFERRED_LOG_FLUSH.
For example, to
change the max size of a family to 128MB, do:
hbase> alter
't1', METHOD => 'table_att', MAX_FILESIZE => '134217728'
There could be
more than one alteration in one command:
hbase> alter
't1', {NAME => 'f1'}, {NAME => 'f2', METHOD => 'delete'}