From 8c1edeb2b8d8da6058e78df2ec907ec4df986012 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Mon, 9 Mar 2015 10:00:21 +1000 Subject: [PATCH] HBASE-13177 Document compact and major_compact HBase shell commands and Admin APIs --- src/main/asciidoc/_chapters/hbase_mob.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/asciidoc/_chapters/hbase_mob.adoc b/src/main/asciidoc/_chapters/hbase_mob.adoc index 0882de88505..52f20f60b44 100644 --- a/src/main/asciidoc/_chapters/hbase_mob.adoc +++ b/src/main/asciidoc/_chapters/hbase_mob.adoc @@ -120,6 +120,21 @@ Because there can be a large number of MOB files at any time, as compared to the === MOB Optimization Tasks +==== Manually Compacting MOB Files + +To manually compact MOB files, rather than waiting for the <> to trigger compaction, use the `compact_mob` or `major_compact_mob` HBase shell commands. These commands require the first argument to be the table name, and take an optional column family as the second argument. If the column family is omitted, all MOB-enabled column families are compacted. + +---- +hbase> compact_mob 't1', 'c1' +hbase> compact_mob 't1' +hbase> major_compact_mob 't1', 'c1' +hbase> major_compact_mob 't1' +---- + +These commands are also available via `Admin.compactMob` and `Admin.majorCompactMob` methods. + +==== MOB Sweeper + HBase MOB currently relies on a MapReduce job called the Sweeper tool for optimization. The Sweeper tool oalesces small MOB files or MOB files with many deletions or updates. A native MOB compaction tool is still in testing. To configure the Sweeper tool, set the following options: [source,xml]