[
https://issues.apache.org/jira/browse/HBASE-29916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18060353#comment-18060353
]
JinHyuk Kim commented on HBASE-29916:
-------------------------------------
After fix:
{code:java}
hbase:001:0> help 'alter_async'
Alter column family schema, does not wait for all regions to receive the
schema changes. 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_async 't1', NAME => 'f1', VERSIONS => 5
To delete the 'f1' column family in table 'ns1:t1', do:
hbase> alter_async 'ns1:t1', NAME => 'f1', METHOD => 'delete'
or a shorter version:
hbase> alter_async 'ns1:t1', 'delete' => 'f1'
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_async 't1', METHOD => 'table_att', MAX_FILESIZE => '134217728'
There could be more than one alteration in one command:
hbase> alter_async 't1', {NAME => 'f1'}, {NAME => 'f2', METHOD => 'delete'}
To check if all the regions have been updated, use alter_status
<table_name>{code}
> Correct alter_async help text examples
> --------------------------------------
>
> Key: HBASE-29916
> URL: https://issues.apache.org/jira/browse/HBASE-29916
> Project: HBase
> Issue Type: Task
> Components: shell
> Reporter: JinHyuk Kim
> Assignee: JinHyuk Kim
> Priority: Trivial
> Labels: pull-request-available
>
> h1. Description
> The shell help text for the {{alter_async}} command currently includes
> incorrect examples that use {{alter}} instead of {{{}alter_async{}}}.
>
> {code:java}
> hbase:006:0> help 'alter_async'
> ...
> To delete the 'f1' column family in table 'ns1:t1', do:
> hbase> alter_async 'ns1:t1', NAME => 'f1', METHOD => 'delete'
> or a shorter version:
> hbase> alter_async 'ns1:t1', 'delete' => 'f1'
> 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'
> # This should be alter_async !
> There could be more than one alteration in one command:
> hbase> alter 't1', {NAME => 'f1'}, {NAME => 'f2', METHOD => 'delete'}
> # This should be alter_async !{code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)