@InterfaceAudience.LimitedPrivate(value="Tools") public class MajorCompactor extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
Modifier and Type | Class and Description |
---|---|
(package private) class |
MajorCompactor.Compact |
Modifier and Type | Field and Description |
---|---|
protected ClusterCompactionQueues |
clusterCompactionQueues |
protected Connection |
connection |
protected static Set<MajorCompactionRequest> |
ERRORS |
protected ExecutorService |
executor |
private static org.slf4j.Logger |
LOG |
private int |
numRegions |
private int |
numServers |
private boolean |
skipWait |
protected long |
sleepForMs |
protected Set<String> |
storesToCompact |
protected TableName |
tableName |
private long |
timestamp |
Constructor and Description |
---|
MajorCompactor() |
MajorCompactor(org.apache.hadoop.conf.Configuration conf,
TableName tableName,
Set<String> storesToCompact,
int concurrency,
long timestamp,
long sleepForMs) |
Modifier and Type | Method and Description |
---|---|
private void |
addNewRegions() |
void |
compactAllRegions() |
private boolean |
futuresComplete(List<Future<?>> futures) |
protected org.apache.hbase.thirdparty.org.apache.commons.cli.Options |
getCommonOptions() |
protected Optional<MajorCompactionRequest> |
getMajorCompactionRequest(RegionInfo hri) |
private Map<ServerName,List<RegionInfo>> |
getServerRegionsMap() |
private Collection<ServerName> |
getServersToCompact(Set<ServerName> snSet) |
protected Set<String> |
getStoresRequiringCompaction(MajorCompactionRequest request) |
(package private) void |
initializeWorkQueues() |
private boolean |
isCompacting(MajorCompactionRequest request) |
static void |
main(String[] args) |
protected static void |
printUsage(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options) |
int |
run(String[] args) |
void |
setNumRegions(int numRegions) |
void |
setNumServers(int numServers) |
void |
setSkipWait(boolean skipWait) |
void |
shutdown() |
private static final org.slf4j.Logger LOG
protected static final Set<MajorCompactionRequest> ERRORS
protected ClusterCompactionQueues clusterCompactionQueues
private long timestamp
protected Set<String> storesToCompact
protected ExecutorService executor
protected long sleepForMs
protected Connection connection
private int numServers
private int numRegions
private boolean skipWait
MajorCompactor()
public MajorCompactor(org.apache.hadoop.conf.Configuration conf, TableName tableName, Set<String> storesToCompact, int concurrency, long timestamp, long sleepForMs) throws IOException
IOException
public void compactAllRegions() throws Exception
Exception
private boolean futuresComplete(List<Future<?>> futures)
@InterfaceAudience.Private void initializeWorkQueues() throws IOException
IOException
protected Optional<MajorCompactionRequest> getMajorCompactionRequest(RegionInfo hri) throws IOException
IOException
private Collection<ServerName> getServersToCompact(Set<ServerName> snSet)
private Map<ServerName,List<RegionInfo>> getServerRegionsMap() throws IOException
IOException
public void setNumServers(int numServers)
public void setNumRegions(int numRegions)
public void setSkipWait(boolean skipWait)
private boolean isCompacting(MajorCompactionRequest request) throws Exception
Exception
private void addNewRegions()
protected Set<String> getStoresRequiringCompaction(MajorCompactionRequest request) throws IOException
IOException
protected org.apache.hbase.thirdparty.org.apache.commons.cli.Options getCommonOptions()
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
protected static void printUsage(org.apache.hbase.thirdparty.org.apache.commons.cli.Options options)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.