[
https://issues.apache.org/jira/browse/HBASE-25549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17313008#comment-17313008
]
Zhuoyue Huang commented on HBASE-25549:
---------------------------------------
Make the following changes based on the suggestions:
1. Added an optional 'lazy_mode' flag to the 'alter' command
2. For conservative considerations, only general table properties are allowed
to be modified, CF, Coprocessor, and region replicas are not allowed to be
changed when lazy_mode is enabled
3. When users use lazy_mode, there will be a warning message
{code:java}
hbase:001:0> create 't1','f1'
hbase:002:0> alter 't1','f2',METHOD=>'lazy_mode'
WARNING: You are using lazy_mode to modify a table, which will cause
inconsistencies in online regions configuration and other risks. If you
encounter any problems, use non-lazy mode to alter again!
ERROR: Can not modify Column Family when the lazy mode was enabled
For usage try 'help "alter"'
Took 0.1726 seconds
{code}
{code:java}
hbase:003:0> alter 't1', NAME => 'f1', METHOD=>'lazy_mode'
,,CONFIGURATION=>{'COMPRESSION'=>'SNAPPY'}
WARNING: You are using lazy_mode to modify a table, which will cause
inconsistencies in online regions configuration and other risks. If you
encounter any problems, use non-lazy mode to alter again!
ERROR: Can not modify Column Family when the lazy mode was enabled
For usage try 'help "alter"'
Took 0.1262 seconds
{code}
{code:java}
hbase:004:0> alter
't1',METHOD=>'lazy_mode',CONFIGURATION=>{'REGION_REPLICATION'=>'3'}
WARNING: You are using lazy_mode to modify a table, which will cause
inconsistencies in online regions configuration and other risks. If you
encounter any problems, use non-lazy mode to alter again!
ERROR: Can not modify REGION_REPLICATION of a table when the lazy mode was
enabled
For usage try 'help "alter"'
Took 0.1393 seconds
{code}
{code:java}
hbase:005:0> alter
't1',METHOD=>'lazy_mode',CONFIGURATION=>{'hbase.hregion.majorcompaction'=>'259200000'}
WARNING: You are using lazy_mode to modify a table, which will cause
inconsistencies in online regions configuration and other risks. If you
encounter any problems, use non-lazy mode to alter again!
Took 0.0168 seconds
{code}
Suggestions are welcome!
> A new hbase shell command: 'alter_lazy'
> ---------------------------------------
>
> Key: HBASE-25549
> URL: https://issues.apache.org/jira/browse/HBASE-25549
> Project: HBase
> Issue Type: Improvement
> Components: master, shell
> Affects Versions: 3.0.0-alpha-1
> Reporter: Zhuoyue Huang
> Assignee: Zhuoyue Huang
> Priority: Major
> Fix For: 3.0.0-alpha-1
>
>
> Under normal circumstances, modifying a table will cause all regions
> belonging to the table to enter RIT. Imagine the following two scenarios:
> # Someone entered the wrong configuration (e.g. negative
> 'hbase.busy.wait.multiplier.max' value) when altering the table, causing
> thousands of online regions to fail to open, leading to online accidents.
> # Modify the configuration of a table, but this modification is not urgent,
> the regions are not expected to enter RIT immediately.
> 'alter_lazy' is a new command to modify a table without reopening any online
> regions except those regions were assigned by other threads or split etc.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)