Package org.apache.hadoop.hbase.mob
Class MobFileCompactionChore
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.mob.MobFileCompactionChore
- All Implemented Interfaces:
Runnable
Periodic MOB compaction chore.
It runs MOB compaction on region servers in parallel, thus utilizing distributed cluster
resources. To avoid possible major compaction storms, one can specify maximum number regions to
be compacted in parallel by setting configuration parameter:
'hbase.mob.major.compaction.region.batch.size', which by default is 0 (unlimited).
'hbase.mob.major.compaction.region.batch.size', which by default is 0 (unlimited).
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private HMaster
private int
-
Constructor Summary
ConstructorDescriptionMobFileCompactionChore
(org.apache.hadoop.conf.Configuration conf, int batchSize) MobFileCompactionChore
(HMaster master) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
chore()
The task to execute on each scheduled execution of the Chorevoid
performMajorCompactionInBatches
(Admin admin, TableDescriptor htd, ColumnFamilyDescriptor hcd) private void
startCompaction
(Admin admin, TableName table, RegionInfo region, byte[] cf) Methods inherited from class org.apache.hadoop.hbase.ScheduledChore
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
-
Field Details
-
LOG
-
master
-
regionBatchSize
-
-
Constructor Details
-
MobFileCompactionChore
-
MobFileCompactionChore
-
-
Method Details
-
chore
Description copied from class:ScheduledChore
The task to execute on each scheduled execution of the Chore- Specified by:
chore
in classScheduledChore
-
performMajorCompactionInBatches
public void performMajorCompactionInBatches(Admin admin, TableDescriptor htd, ColumnFamilyDescriptor hcd) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
startCompaction
private void startCompaction(Admin admin, TableName table, RegionInfo region, byte[] cf) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-