HBASE-20299 Update MOB in hbase refguide

Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d9e64aa6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d9e64aa6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d9e64aa6

Branch: refs/heads/HBASE-19064
Commit: d9e64aa6b83fb6ed5230b0fde86fdf8d8732e1a4
Parents: f92fb0a
Author: Huaxiang Sun <h...@cloudera.com>
Authored: Tue Apr 3 13:12:45 2018 -0700
Committer: Huaxiang Sun <h...@cloudera.com>
Committed: Tue Apr 3 13:13:16 2018 -0700

----------------------------------------------------------------------
 src/main/asciidoc/_chapters/hbase_mob.adoc | 42 +++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d9e64aa6/src/main/asciidoc/_chapters/hbase_mob.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/hbase_mob.adoc 
b/src/main/asciidoc/_chapters/hbase_mob.adoc
index 5da0343..9730529 100644
--- a/src/main/asciidoc/_chapters/hbase_mob.adoc
+++ b/src/main/asciidoc/_chapters/hbase_mob.adoc
@@ -46,6 +46,12 @@ configure the MOB file reader's cache settings for each 
RegionServer (see
 Client code does not need to change to take advantage of HBase MOB support. The
 feature is transparent to the client.
 
+MOB compaction
+
+MOB data is flushed into MOB files after MemStore flush. There will be lots of 
MOB files
+after some time. To reduce MOB file count, there is a periodic task which 
compacts
+small MOB files into a large one (MOB compaction).
+
 === Configuring Columns for MOB
 
 You can configure columns to support MOB during table creation or alteration,
@@ -75,6 +81,42 @@ hcd.setMobThreshold(102400L);
 ----
 ====
 
+=== Configure MOB Compaction Policy
+
+By default, MOB files for one specific day are compacted into one large MOB 
file.
+To reduce MOB file count more, there are other MOB Compaction policies 
supported.
+
+daily policy  - compact MOB Files for one day into one large MOB file (default 
policy)
+weekly policy - compact MOB Files for one week into one large MOB file
+montly policy - compact MOB Files for one  month into one large MOB File
+
+.Configure MOB compaction policy Using HBase Shell
+====
+----
+hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'daily'}
+hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'weekly'}
+hbase> create 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'monthly'}
+
+hbase> alter 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'daily'}
+hbase> alter 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'weekly'}
+hbase> alter 't1', {NAME => 'f1', IS_MOB => true, MOB_THRESHOLD => 102400, 
MOB_COMPACT_PARTITION_POLICY => 'monthly'}
+----
+====
+
+=== Configure MOB Compaction mergeable threshold
+
+If the size of a mob file is less than this value, it's regarded as a small 
file and needs to
+be merged in mob compaction. The default value is 1280MB.
+
+====
+[source,xml]
+----
+<property>
+    <name>hbase.mob.compaction.mergeable.threshold</name>
+    <value>10000000000</value>
+</property>
+----
+====
 
 === Testing MOB
 

Reply via email to