@InterfaceAudience.LimitedPrivate(value="Configuration") public class PressureAwareCompactionThroughputController extends org.apache.hadoop.conf.Configured implements CompactionThroughputController, Stoppable
Store.getCompactionPressure()
Modifier and Type | Class and Description |
---|---|
private static class |
PressureAwareCompactionThroughputController.ActiveCompaction
Stores the information of one controlled compaction.
|
Constructor and Description |
---|
PressureAwareCompactionThroughputController() |
Modifier and Type | Method and Description |
---|---|
long |
control(String compactionName,
long size)
Control the compaction throughput.
|
void |
finish(String compactionName)
Finish a compaction.
|
boolean |
isStopped() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setup(RegionServerServices server)
Setup controller for the given region server.
|
void |
start(String compactionName)
Start a compaction.
|
void |
stop(String why)
Stop this service.
|
private String |
throughputDesc(double speed) |
private String |
throughputDesc(long deltaSize,
long elapsedTime) |
String |
toString() |
private void |
tune(double compactionPressure) |
private static final org.apache.commons.logging.Log LOG
public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_HIGHER_BOUND
private static final long DEFAULT_HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_HIGHER_BOUND
public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_LOWER_BOUND
private static final long DEFAULT_HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_LOWER_BOUND
public static final String HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_OFFPEAK
private static final long DEFAULT_HBASE_HSTORE_COMPACTION_MAX_THROUGHPUT_OFFPEAK
public static final String HBASE_HSTORE_COMPACTION_THROUGHPUT_TUNE_PERIOD
private static final int DEFAULT_HSTORE_COMPACTION_THROUGHPUT_TUNE_PERIOD
private long maxThroughputHigherBound
private long maxThroughputLowerBound
private long maxThroughputOffpeak
private OffPeakHours offPeakHours
private long controlPerSize
private int tuningPeriod
volatile double maxThroughput
private final ConcurrentMap<String,PressureAwareCompactionThroughputController.ActiveCompaction> activeCompactions
private volatile boolean stopped
public PressureAwareCompactionThroughputController()
public void setup(RegionServerServices server)
CompactionThroughputController
setup
in interface CompactionThroughputController
private void tune(double compactionPressure)
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class org.apache.hadoop.conf.Configured
private String throughputDesc(long deltaSize, long elapsedTime)
private String throughputDesc(double speed)
public void start(String compactionName)
CompactionThroughputController
start
in interface CompactionThroughputController
public long control(String compactionName, long size) throws InterruptedException
CompactionThroughputController
control
in interface CompactionThroughputController
InterruptedException
public void finish(String compactionName)
CompactionThroughputController
finish
in interface CompactionThroughputController
public boolean isStopped()
isStopped
in interface Stoppable
Stoppable.stop(String)
has been closed.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.