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
Fields inherited from class org.apache.hadoop.hbase.util.compaction.MajorCompactor
clusterCompactionQueues, connection, ERRORS, executor, sleepForMs, storesToCompact, tableName
-
Constructor Summary
ModifierConstructorDescriptionprotected
MajorCompactorTTL
(org.apache.hadoop.conf.Configuration conf, TableDescriptor htd, int concurrency, long sleepForMs) -
Method Summary
Modifier and TypeMethodDescriptionint
compactRegionsTTLOnTable
(org.apache.hadoop.conf.Configuration conf, String table, int concurrency, long sleep, int numServers, int numRegions, boolean dryRun, boolean skipWait) private boolean
protected Optional<MajorCompactionRequest>
private org.apache.hbase.thirdparty.org.apache.commons.cli.Options
static void
int
Methods inherited from class org.apache.hadoop.hbase.util.compaction.MajorCompactor
compactAllRegions, getCommonOptions, initializeWorkQueues, printUsage, setNumRegions, setNumServers, setSkipWait, shutdown
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getMajorCompactionRequest
in classMajorCompactor
- Throws:
IOException
-
getStoresRequiringCompaction
protected Set<String> getStoresRequiringCompaction(MajorCompactionRequest request) throws IOException - Overrides:
getStoresRequiringCompaction
in 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:
run
in interfaceorg.apache.hadoop.util.Tool
- Overrides:
run
in classMajorCompactor
- Throws:
Exception
-
main
- Throws:
Exception
-