You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2014/07/16 21:00:06 UTC
[jira] [Updated] (HBASE-2171) Alter statement in the hbase shell
doesn't match documentation.
[ https://issues.apache.org/jira/browse/HBASE-2171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stack updated HBASE-2171:
-------------------------
Assignee: Alex Newman
> Alter statement in the hbase shell doesn't match documentation.
> ---------------------------------------------------------------
>
> Key: HBASE-2171
> URL: https://issues.apache.org/jira/browse/HBASE-2171
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.20.2, 0.20.3
> Environment: linux
> java -version
> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
> Reporter: Alex Newman
> Assignee: Alex Newman
>
> The documentation claims this should work. Perhaps this jira could be a starting point for a more detailed explanation of alter
> HBASE SHELL COMMANDS:
> alter Alter column family schema; pass table name and a dictionary
> specifying new column family schema. Dictionaries are described
> below in the GENERAL NOTES section. 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'}
> You can also change table-scope attributes like MAX_FILESIZE
> MEMSTORE_FLUSHSIZE and READONLY.
> For example, to change the max size of a family to 128MB, do:
> hbase> alter 't1', {METHOD => 'table_att', MAX_FILESIZE => '134217728'}
> ....
> ase Shell; enter 'help<RETURN>' for list of supported commands.
> Version: 0.20.3, r902334, Mon Jan 25 13:13:08 PST 2010
> hbase(main):001:0> drop 't3'
> 0 row(s) in 0.0060 seconds
> 0 row(s) in 0.0050 seconds
> 0 row(s) in 0.1560 seconds
> hbase(main):002:0> create 't3'
> 0 row(s) in 2.1050 seconds
> hbase(main):003:0> disable 't3'
> 0 row(s) in 2.0980 seconds
> hbase(main):004:0> alter 't3', {NAME => 'f1', VERSIONS => 5}
> NativeException: java.lang.NullPointerException: null
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)