From 9c0f4f5c713e6db9de532896f344b888f2546636 Mon Sep 17 00:00:00 2001 From: Ashish Singhi Date: Mon, 22 Sep 2014 17:29:04 +0530 Subject: [PATCH] HBASE-12049 Help for alter command is a bit confusing --- hbase-shell/src/main/ruby/shell/commands/alter.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hbase-shell/src/main/ruby/shell/commands/alter.rb b/hbase-shell/src/main/ruby/shell/commands/alter.rb index 7ef185f..6c4ed58 100644 --- a/hbase-shell/src/main/ruby/shell/commands/alter.rb +++ b/hbase-shell/src/main/ruby/shell/commands/alter.rb @@ -22,14 +22,14 @@ module Shell class Alter < Command def help return <<-EOF -Alter a table. Depending on the HBase setting ("hbase.online.schema.update.enable"), -the table must be disabled or not to be altered (see help 'disable'). -You can add/modify/delete column families, as well as change table -configuration. Column families work similarly to create; column family +Alter a table. If "hbase.online.schema.update.enable" property is set to false, +then table must be disabled else need not be disabled (see help 'disable'). +You can add/modify/delete column families, as well as change table +configuration. Column families work similarly to create; column family spec can either be a name string, or a dictionary with NAME attribute. Dictionaries are described on the main help command output. -For example, to change or add the 'f1' column family in table 't1' from +For example, to change or add the 'f1' column family in table 't1' from current value to keep a maximum of 5 cell VERSIONS, do: hbase> alter 't1', NAME => 'f1', VERSIONS => 5 @@ -43,7 +43,7 @@ To delete the 'f1' column family in table 'ns1:t1', use one of: hbase> alter 'ns1:t1', NAME => 'f1', METHOD => 'delete' hbase> alter 'ns1:t1', 'delete' => 'f1' -You can also change table-scope attributes like MAX_FILESIZE, READONLY, +You can also change table-scope attributes like MAX_FILESIZE, READONLY, MEMSTORE_FLUSHSIZE, DEFERRED_LOG_FLUSH, etc. These can be put at the end; for example, to change the max size of a region to 128MB, do: @@ -80,7 +80,7 @@ You can also set REGION_REPLICATION: There could be more than one alteration in one command: - hbase> alter 't1', { NAME => 'f1', VERSIONS => 3 }, + hbase> alter 't1', { NAME => 'f1', VERSIONS => 3 }, { MAX_FILESIZE => '134217728' }, { METHOD => 'delete', NAME => 'f2' }, OWNER => 'johndoe', METADATA => { 'mykey' => 'myvalue' } EOF -- 1.9.2.msysgit.0