Class BusyRegionSplitPolicy
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy
org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy
org.apache.hadoop.hbase.regionserver.BusyRegionSplitPolicy
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
@LimitedPrivate("Configuration")
public class BusyRegionSplitPolicy
extends IncreasingToUpperBoundRegionSplitPolicy
This class represents a split policy which makes the split decision based on how busy a region
is. The metric that is used here is the fraction of total write requests that are blocked due to
high memstore utilization. This fractional rate is calculated over a running window of
"hbase.busy.policy.aggWindow" milliseconds. The rate is a time-weighted aggregated average of the
rate in the current window and the true average rate in the previous window.
-
Field Summary
Modifier and TypeFieldDescriptionprivate long
private float
private long
static final long
static final float
static final long
private static final org.slf4j.Logger
private float
private long
private long
private HRegion
private long
private long
Fields inherited from class org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy
initialSize
Fields inherited from class org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy
overallHRegionFiles
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureForRegion
(HRegion region) Upon construction, this method will be called with the region to be governed.private void
init()
protected boolean
Returns true if the specified region should be split.toString()
private float
Update the blocked request rate based on number of blocked and total write requests in the last aggregation window, or since last call to this method, whichever is farthest in time.Methods inherited from class org.apache.hadoop.hbase.regionserver.IncreasingToUpperBoundRegionSplitPolicy
getSizeToCheck
Methods inherited from class org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy
getDesiredMaxFileSize, isExceedSize, positiveJitterRate
Methods inherited from class org.apache.hadoop.hbase.regionserver.RegionSplitPolicy
canSplit, create, getSplitPoint, getSplitPolicyClass, skipStoreFileRangeCheck
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
-
Field Details
-
LOG
-
maxBlockedRequests
-
DEFAULT_MAX_BLOCKED_REQUESTS
- See Also:
-
minAge
-
DEFAULT_MIN_AGE_MS
- See Also:
-
aggregationWindow
-
DEFAULT_AGGREGATION_WINDOW
- See Also:
-
region
-
prevTime
-
startTime
-
writeRequestCount
-
blockedRequestCount
-
blockedRate
-
-
Constructor Details
-
BusyRegionSplitPolicy
public BusyRegionSplitPolicy()
-
-
Method Details
-
toString
- Overrides:
toString
in classIncreasingToUpperBoundRegionSplitPolicy
-
configureForRegion
Description copied from class:RegionSplitPolicy
Upon construction, this method will be called with the region to be governed. It will be called once and only once.- Overrides:
configureForRegion
in classIncreasingToUpperBoundRegionSplitPolicy
-
init
-
shouldSplit
Description copied from class:RegionSplitPolicy
Returns true if the specified region should be split.- Overrides:
shouldSplit
in classIncreasingToUpperBoundRegionSplitPolicy
-
updateRate
Update the blocked request rate based on number of blocked and total write requests in the last aggregation window, or since last call to this method, whichever is farthest in time. Uses weighted rate calculation based on the previous rate and new data.- Returns:
- Updated blocked request rate.
-