Class MajorCompactor
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.util.compaction.MajorCompactor
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
MajorCompactorTTL
@LimitedPrivate("Tools")
public class MajorCompactor
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClusterCompactionQueuesprotected Connectionprotected static final Set<MajorCompactionRequest>protected ExecutorServiceprivate static final org.slf4j.Loggerprivate intprivate intprivate booleanprotected longprotected TableNameprivate long -
Constructor Summary
ConstructorsConstructorDescriptionMajorCompactor(org.apache.hadoop.conf.Configuration conf, TableName tableName, Set<String> storesToCompact, int concurrency, long timestamp, long sleepForMs) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidprivate booleanfuturesComplete(List<Future<?>> futures) protected org.apache.hbase.thirdparty.org.apache.commons.cli.Optionsprotected Optional<MajorCompactionRequest>private Map<ServerName,List<RegionInfo>> private Collection<ServerName>getServersToCompact(Set<ServerName> snSet) (package private) voidprivate booleanisCompacting(MajorCompactionRequest request) static voidprotected static voidprintUsage(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options) intvoidsetNumRegions(int numRegions) voidsetNumServers(int numServers) voidsetSkipWait(boolean skipWait) voidshutdown()Methods 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
-
ERRORS
-
clusterCompactionQueues
-
timestamp
-
storesToCompact
-
executor
-
sleepForMs
-
connection
-
tableName
-
numServers
-
numRegions
-
skipWait
-
-
Constructor Details
-
MajorCompactor
-
MajorCompactor
public MajorCompactor(org.apache.hadoop.conf.Configuration conf, TableName tableName, Set<String> storesToCompact, int concurrency, long timestamp, long sleepForMs) throws IOException - Throws:
IOException
-
-
Method Details
-
compactAllRegions
- Throws:
Exception
-
futuresComplete
-
shutdown
- Throws:
Exception
-
initializeWorkQueues
- Throws:
IOException
-
getMajorCompactionRequest
protected Optional<MajorCompactionRequest> getMajorCompactionRequest(RegionInfo hri) throws IOException - Throws:
IOException
-
getServersToCompact
-
getServerRegionsMap
- Throws:
IOException
-
setNumServers
-
setNumRegions
-
setSkipWait
-
isCompacting
- Throws:
Exception
-
addNewRegions
-
getStoresRequiringCompaction
protected Set<String> getStoresRequiringCompaction(MajorCompactionRequest request) throws IOException - Throws:
IOException
-
getCommonOptions
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
printUsage
protected static void printUsage(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options) -
main
- Throws:
Exception
-