hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yang Wang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-9756) HBase shell help info would be better to display only when usage error instead of any exception
Date Mon, 14 Oct 2013 02:53:41 GMT

     [ https://issues.apache.org/jira/browse/HBASE-9756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yang Wang updated HBASE-9756:
-----------------------------

    Attachment: HBASE-9756.patch

Attach a patch to improve HBase shell.

> HBase shell help info would be better to display only when usage error instead of any
exception
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-9756
>                 URL: https://issues.apache.org/jira/browse/HBASE-9756
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Yang Wang
>            Priority: Minor
>         Attachments: HBASE-9756.patch
>
>
> When error occurred in HBase shell, no matter what error it is, the help info will display.
As help info is used to instruct how to use the command, so it would be better to show help
info only when the command is used in a wrong way.
> {noformat}
> Example :
> hbase(main):009:0* create 't1', 'cf1'
> ERROR: Table already exists: t1!
> Here is some help for this command:
> Creates a table. Pass a table name, and a set of column family
> specifications (at least one), and, optionally, table configuration.
> Column specification can be a simple string (name), or a dictionary
> (dictionaries are described below in main help output), necessarily 
> including NAME attribute. 
> Examples:
>   hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
>   hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
>   hbase> # The above in shorthand would be the following:
>   hbase> create 't1', 'f1', 'f2', 'f3'
>   hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE
=> true}
>   hbase> create 't1', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles'
=> '10'}}
>   
> Table configuration options can be put at the end.
> Examples:
>   hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']
>   hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'
>   hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey'
=> 'myvalue' }
>   hbase> # Optionally pre-split the table into NUMREGIONS, using
>   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
>   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
>   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit',
CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}
> You can also keep around a reference to the created table:
>   hbase> t1 = create 't1', 'f1'
> Which gives you a reference to the table named 't1', on which you can then
> call methods.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message