Class RegionNormalizerWorker
java.lang.Object
org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorker
- All Implemented Interfaces:
Runnable
,ConfigurationObserver
,PropagatingConfigurationObserver
@Private
class RegionNormalizerWorker
extends Object
implements PropagatingConfigurationObserver, Runnable
Consumes normalization request targets (
TableName
s) off the
RegionNormalizerWorkQueue
, dispatches them to the RegionNormalizer
, and executes
the resulting NormalizationPlan
s.-
Field Summary
Modifier and TypeFieldDescription(package private) static final String
private final AtomicLong
(package private) static final long
private final boolean
static final String
private static final org.slf4j.Logger
private final MasterServices
private long
(package private) static final String
private static final long
private final org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter
private final RegionNormalizer
private final long[]
private long
private final RegionNormalizerWorkQueue<TableName>
-
Constructor Summary
ConstructorDescriptionRegionNormalizerWorker
(org.apache.hadoop.conf.Configuration configuration, MasterServices masterServices, RegionNormalizer regionNormalizer, RegionNormalizerWorkQueue<TableName> workQueue) -
Method Summary
Modifier and TypeMethodDescriptionprivate List<NormalizationPlan>
calculatePlans
(TableName tableName) void
deregisterChildren
(ConfigurationManager manager) Needs to be called to deregister the children from the manager.private boolean
extractDefaultNormalizerValue
(org.apache.hadoop.conf.Configuration configuration) (package private) long
(package private) org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter
Used in test only.(package private) long
(package private) long
private static long
loadRateLimit
(org.apache.hadoop.conf.Configuration configuration) private static org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter
loadRateLimiter
(org.apache.hadoop.conf.Configuration configuration) private static long
logLongConfigurationUpdated
(String key, long oldValue, long newValue) void
onConfigurationChange
(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.(package private) void
void
registerChildren
(ConfigurationManager manager) Needs to be called to register the children to the manager.void
run()
private void
Interacts withMasterServices
in order to execute a plan.private void
submitPlans
(List<NormalizationPlan> plans) private void
Interacts withMasterServices
in order to execute a plan.private List<NormalizationPlan>
truncateForSize
(List<NormalizationPlan> plans)
-
Field Details
-
HBASE_TABLE_NORMALIZATION_ENABLED
- See Also:
-
LOG
-
RATE_LIMIT_BYTES_PER_SEC_KEY
- See Also:
-
RATE_UNLIMITED_BYTES
- See Also:
-
CUMULATIVE_SIZE_LIMIT_MB_KEY
- See Also:
-
DEFAULT_CUMULATIVE_SIZE_LIMIT_MB
- See Also:
-
masterServices
-
regionNormalizer
-
workQueue
-
rateLimiter
-
skippedCount
-
defaultNormalizerTableLevel
-
splitPlanCount
-
mergePlanCount
-
cumulativePlansSizeLimitMb
-
-
Constructor Details
-
RegionNormalizerWorker
RegionNormalizerWorker(org.apache.hadoop.conf.Configuration configuration, MasterServices masterServices, RegionNormalizer regionNormalizer, RegionNormalizerWorkQueue<TableName> workQueue)
-
-
Method Details
-
extractDefaultNormalizerValue
-
registerChildren
Description copied from interface:PropagatingConfigurationObserver
Needs to be called to register the children to the manager.- Specified by:
registerChildren
in interfacePropagatingConfigurationObserver
- Parameters:
manager
- : to register to
-
deregisterChildren
Description copied from interface:PropagatingConfigurationObserver
Needs to be called to deregister the children from the manager.- Specified by:
deregisterChildren
in interfacePropagatingConfigurationObserver
- Parameters:
manager
- : to deregister from
-
logLongConfigurationUpdated
-
onConfigurationChange
Description copied from interface:ConfigurationObserver
This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.- Specified by:
onConfigurationChange
in interfaceConfigurationObserver
-
loadRateLimiter
private static org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter loadRateLimiter(org.apache.hadoop.conf.Configuration configuration) -
loadRateLimit
-
planSkipped
-
getSkippedCount
-
getSplitPlanCount
long getSplitPlanCount() -
getMergePlanCount
long getMergePlanCount() -
getRateLimiter
org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter getRateLimiter()Used in test only. This field is exposed to the test, as opposed to tracking the current configuration value beside the RateLimiter instance and managing synchronization to keep the two in sync. -
run
-
calculatePlans
-
truncateForSize
-
submitPlans
-
submitMergePlan
Interacts withMasterServices
in order to execute a plan. -
submitSplitPlan
Interacts withMasterServices
in order to execute a plan.
-