You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Sean Busbey (Jira)" <ji...@apache.org> on 2019/12/09 16:09:00 UTC

[jira] [Commented] (HBASE-23549) Document steps to disable MOB for a column family

    [ https://issues.apache.org/jira/browse/HBASE-23549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16991734#comment-16991734 ] 

Sean Busbey commented on HBASE-23549:
-------------------------------------

confirmed this works, does not require an outage but will have a brief blip of client retries when the regions are reloaded.

1) Ensure the mob compaction chore is off by having hbase.mob.file.compaction.chore.period set to 0 for the master. (requires rolling restart of masters) You should also ensure you do not issue any mob compactions via the hbase shell.
2) In the hbase shell change the MOB size threshold for the column family you’re moving out of MOB to be larger then the largest cell e.g. table named ‘table_1’ and column named ‘example_cf’ and we'll use a max cell size of 1GB
{code}
hbase(main):011:0> alter 'table_1', {NAME => 'example_cf', MOB_THRESHOLD => '1000000000'}
Updating all regions with the new schema...
9/25 regions updated.
25/25 regions updated.
Done.
0 row(s) in 3.4940 seconds
{code}
Note that if you are still ingesting data you must ensure this threshold is larger than any cell value. MAX_INT is a safe choice.
3) Perform a major compaction on the table (a normal major compaction, not a mob compaction)
{code}
hbase(main):012:0> major_compact 'table_1'
0 row(s) in 0.2600 seconds
{code}
5) Since that command is asynchronous, you’ll have to monitor for the end.
{code}
hbase(main):015:0> @hbase.admin(@formatter).instance_eval do p @admin.get_compaction_state('table_1').to_string end
“MAJOR”
{code}
When it’s done this command will say “NONE”
{code}
hbase(main):016:0> @hbase.admin(@formatter).instance_eval do p @admin.get_compaction_state('table_1').to_string end
“NONE”
{code}
6) Run the MobRefReporter job to ensure there are no mob cells. In particular the job should show 0 input records
{code}
...
        Map-Reduce Framework
                Map input records=0

...
{code}
7) Alter the column family configs so that the MOB feature is disabled
{code}
hbase(main):017:0> alter 'table_1', {NAME => 'example_cf', IS_MOB => 'false'}
Updating all regions with the new schema...
8/25 regions updated.
25/25 regions updated.
Done.
0 row(s) in 2.9370 seconds
{code}
8 ) There will be residual data in the mobdir area.
{code}
$ hdfs dfs -count /hbase/mobdir/data/default/table_1
           4           54         9063269081 /hbase/mobdir/data/default/table_1
{code}
This data is spurious and may be reclaimed. You should sideline it, verify your application’s view of the table, and then delete it.

> Document steps to disable MOB for a column family
> -------------------------------------------------
>
>                 Key: HBASE-23549
>                 URL: https://issues.apache.org/jira/browse/HBASE-23549
>             Project: HBase
>          Issue Type: Improvement
>          Components: documentation, mob
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>            Priority: Minor
>
> Ref guide has steps for enabling MOB on a column family but has no corresponding instructions on safely turning the feature off.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)