@InterfaceAudience.LimitedPrivate(value="Configuration") public abstract class PressureAwareThroughputController extends org.apache.hadoop.conf.Configured implements ThroughputController, Stoppable
Modifier and Type | Class and Description |
---|---|
private static class |
PressureAwareThroughputController.ActiveOperation
Stores the information of one controlled compaction.
|
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<String,PressureAwareThroughputController.ActiveOperation> |
activeOperations |
protected long |
controlPerSize |
private static org.slf4j.Logger |
LOG |
private double |
maxThroughput |
protected long |
maxThroughputLowerBound |
private double |
maxThroughputPerOperation |
protected long |
maxThroughputUpperBound |
protected OffPeakHours |
offPeakHours |
private boolean |
stopped |
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.
|
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) |
private static final org.slf4j.Logger LOG
protected long maxThroughputUpperBound
protected long maxThroughputLowerBound
protected OffPeakHours offPeakHours
protected long controlPerSize
protected int tuningPeriod
private volatile double maxThroughput
private volatile double maxThroughputPerOperation
protected final ConcurrentMap<String,PressureAwareThroughputController.ActiveOperation> activeOperations
private volatile boolean stopped
public PressureAwareThroughputController()
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
public 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–2020 The Apache Software Foundation. All rights reserved.