Class MajorCompactorTTL
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.util.compaction.MajorCompactor
org.apache.hadoop.hbase.util.compaction.MajorCompactorTTL
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
RSGroupMajorCompactionTTL
This tool compacts a table's regions that are beyond it's TTL. It helps to save disk space and
regions become empty as a result of compaction.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.compaction.MajorCompactor
MajorCompactor.Compact -
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.util.compaction.MajorCompactor
clusterCompactionQueues, connection, ERRORS, executor, sleepForMs, storesToCompact, tableName -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMajorCompactorTTL(org.apache.hadoop.conf.Configuration conf, TableDescriptor htd, int concurrency, long sleepForMs) -
Method Summary
Modifier and TypeMethodDescriptionintcompactRegionsTTLOnTable(org.apache.hadoop.conf.Configuration conf, String table, int concurrency, long sleep, int numServers, int numRegions, boolean dryRun, boolean skipWait) private booleanprotected Optional<MajorCompactionRequest>private org.apache.hbase.thirdparty.org.apache.commons.cli.Optionsstatic voidintMethods inherited from class org.apache.hadoop.hbase.util.compaction.MajorCompactor
compactAllRegions, getCommonOptions, initializeWorkQueues, printUsage, setNumRegions, setNumServers, setSkipWait, shutdownMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
htd
-
-
Constructor Details
-
MajorCompactorTTL
@Private public MajorCompactorTTL(org.apache.hadoop.conf.Configuration conf, TableDescriptor htd, int concurrency, long sleepForMs) throws IOException - Throws:
IOException
-
MajorCompactorTTL
protected MajorCompactorTTL()
-
-
Method Details
-
getMajorCompactionRequest
protected Optional<MajorCompactionRequest> getMajorCompactionRequest(RegionInfo hri) throws IOException - Overrides:
getMajorCompactionRequestin classMajorCompactor- Throws:
IOException
-
getStoresRequiringCompaction
protected Set<String> getStoresRequiringCompaction(MajorCompactionRequest request) throws IOException - Overrides:
getStoresRequiringCompactionin classMajorCompactor- Throws:
IOException
-
compactRegionsTTLOnTable
public int compactRegionsTTLOnTable(org.apache.hadoop.conf.Configuration conf, String table, int concurrency, long sleep, int numServers, int numRegions, boolean dryRun, boolean skipWait) throws Exception - Throws:
Exception
-
doesAnyColFamilyHaveTTL
-
getOptions
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Overrides:
runin classMajorCompactor- Throws:
Exception
-
main
- Throws:
Exception
-