@InterfaceAudience.LimitedPrivate(value="Configuration") public abstract class PressureAwareThroughputController extends org.apache.hadoop.conf.Configured implements ThroughputController, Stoppable
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<String,org.apache.hadoop.hbase.regionserver.throttle.PressureAwareThroughputController.ActiveOperation> |
activeOperations |
protected long |
controlPerSize |
protected long |
maxThroughputLowerBound |
protected long |
maxThroughputUpperBound |
protected OffPeakHours |
offPeakHours |
protected int |
tuningPeriod |
Constructor and Description |
---|
PressureAwareThroughputController() |
Modifier and Type | Method and Description |
---|---|
long |
control(String opName,
long size)
Control the throughput.
|
void |
finish(String opName)
Finish the controller.
|
double |
getMaxThroughput() |
boolean |
isStopped() |
void |
setMaxThroughput(double maxThroughput) |
abstract void |
setup(RegionServerServices server)
Setup controller for the given region server.
|
protected abstract boolean |
skipControl(long deltaSize,
long controlSize)
Check whether to skip control given delta size and control size
|
void |
start(String opName)
Start the throughput controller.
|
void |
stop(String why)
Stop this service.
|
protected String |
throughputDesc(double speed) |
protected String |
throughputDesc(long deltaSize,
long elapsedTime) |
protected long maxThroughputUpperBound
protected long maxThroughputLowerBound
protected OffPeakHours offPeakHours
protected long controlPerSize
protected int tuningPeriod
protected final ConcurrentMap<String,org.apache.hadoop.hbase.regionserver.throttle.PressureAwareThroughputController.ActiveOperation> activeOperations
public abstract void setup(RegionServerServices server)
ThroughputController
setup
in interface ThroughputController
protected String throughputDesc(long deltaSize, long elapsedTime)
protected String throughputDesc(double speed)
public void start(String opName)
ThroughputController
start
in interface ThroughputController
public long control(String opName, long size) throws InterruptedException
ThroughputController
control
in interface ThroughputController
InterruptedException
protected abstract boolean skipControl(long deltaSize, long controlSize)
deltaSize
- Delta size since last controlcontrolSize
- Size limit to perform controlpublic void finish(String opName)
ThroughputController
finish
in interface ThroughputController
public void stop(String why)
Stoppable
public boolean isStopped()
isStopped
in interface Stoppable
Stoppable.stop(String)
has been closed.public double getMaxThroughput()
public void setMaxThroughput(double maxThroughput)
Copyright © 2007–2019 Cloudera. All rights reserved.