Class PressureAwareThroughputController
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.regionserver.throttle.PressureAwareThroughputController
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,ThroughputController
,Stoppable
- Direct Known Subclasses:
PressureAwareCompactionThroughputController
,PressureAwareFlushThroughputController
@LimitedPrivate("Configuration")
public abstract class PressureAwareThroughputController
extends org.apache.hadoop.conf.Configured
implements ThroughputController, Stoppable
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final class
Stores the information of one controlled compaction. -
Field Summary
Modifier and TypeFieldDescriptionprotected final ConcurrentMap<String,
PressureAwareThroughputController.ActiveOperation> protected long
private static final org.slf4j.Logger
private double
protected long
private double
protected long
protected OffPeakHours
private boolean
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Control the throughput.void
Finish the controller.double
boolean
Returns True ifStoppable.stop(String)
has been closed.void
setMaxThroughput
(double maxThroughput) abstract void
setup
(RegionServerServices server) Setup controller for the given region server.void
Start the throughput controller.void
Stop this service.protected String
throughputDesc
(double speed) protected String
throughputDesc
(long deltaSize, long elapsedTime) Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Field Details
-
LOG
-
maxThroughputUpperBound
-
maxThroughputLowerBound
-
offPeakHours
-
controlPerSize
-
tuningPeriod
-
maxThroughput
-
maxThroughputPerOperation
-
activeOperations
-
stopped
-
-
Constructor Details
-
PressureAwareThroughputController
public PressureAwareThroughputController()
-
-
Method Details
-
setup
Description copied from interface:ThroughputController
Setup controller for the given region server.- Specified by:
setup
in interfaceThroughputController
-
throughputDesc
-
throughputDesc
-
start
Description copied from interface:ThroughputController
Start the throughput controller.- Specified by:
start
in interfaceThroughputController
-
control
Description copied from interface:ThroughputController
Control the throughput. Will sleep if too fast.- Specified by:
control
in interfaceThroughputController
- Returns:
- the actual sleep time.
- Throws:
InterruptedException
-
finish
Description copied from interface:ThroughputController
Finish the controller. Should call this method in a finally block.- Specified by:
finish
in interfaceThroughputController
-
stop
Description copied from interface:Stoppable
Stop this service. Implementers should favor logging errors over throwing RuntimeExceptions. -
isStopped
Description copied from interface:Stoppable
Returns True ifStoppable.stop(String)
has been closed. -
getMaxThroughput
-
setMaxThroughput
-