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
-
Field Summary
Modifier and TypeFieldDescriptionprotected ClusterCompactionQueues
protected Connection
protected static final Set<MajorCompactionRequest>
protected ExecutorService
private static final org.slf4j.Logger
private int
private int
private boolean
protected long
protected TableName
private long
-
Constructor Summary
ConstructorDescriptionMajorCompactor
(org.apache.hadoop.conf.Configuration conf, TableName tableName, Set<String> storesToCompact, int concurrency, long timestamp, long sleepForMs) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
private boolean
futuresComplete
(List<Future<?>> futures) protected org.apache.hbase.thirdparty.org.apache.commons.cli.Options
protected Optional<MajorCompactionRequest>
private Map<ServerName,
List<RegionInfo>> private Collection<ServerName>
getServersToCompact
(Set<ServerName> snSet) (package private) void
private boolean
isCompacting
(MajorCompactionRequest request) static void
protected static void
printUsage
(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options) int
void
setNumRegions
(int numRegions) void
setNumServers
(int numServers) void
setSkipWait
(boolean skipWait) void
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
-
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:
run
in 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
-