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 (
TableNames) off the
RegionNormalizerWorkQueue, dispatches them to the RegionNormalizer, and executes
the resulting NormalizationPlans.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Stringprivate final AtomicLong(package private) static final longprivate final booleanstatic final Stringprivate static final org.slf4j.Loggerprivate final MasterServicesprivate long(package private) static final Stringprivate static final longprivate final org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiterprivate final RegionNormalizerprivate final long[]private longprivate final RegionNormalizerWorkQueue<TableName> -
Constructor Summary
ConstructorsConstructorDescriptionRegionNormalizerWorker(org.apache.hadoop.conf.Configuration configuration, MasterServices masterServices, RegionNormalizer regionNormalizer, RegionNormalizerWorkQueue<TableName> workQueue) -
Method Summary
Modifier and TypeMethodDescriptionprivate List<NormalizationPlan>calculatePlans(TableName tableName) voidderegisterChildren(ConfigurationManager manager) Needs to be called to deregister the children from the manager.private booleanextractDefaultNormalizerValue(org.apache.hadoop.conf.Configuration configuration) (package private) long(package private) org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiterUsed in test only.(package private) long(package private) longprivate static longloadRateLimit(org.apache.hadoop.conf.Configuration configuration) private static org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiterloadRateLimiter(org.apache.hadoop.conf.Configuration configuration) private static longlogLongConfigurationUpdated(String key, long oldValue, long newValue) voidonConfigurationChange(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.(package private) voidvoidregisterChildren(ConfigurationManager manager) Needs to be called to register the children to the manager.voidrun()private voidInteracts withMasterServicesin order to execute a plan.private voidsubmitPlans(List<NormalizationPlan> plans) private voidInteracts withMasterServicesin 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:PropagatingConfigurationObserverNeeds to be called to register the children to the manager.- Specified by:
registerChildrenin interfacePropagatingConfigurationObserver- Parameters:
manager- : to register to
-
deregisterChildren
Description copied from interface:PropagatingConfigurationObserverNeeds to be called to deregister the children from the manager.- Specified by:
deregisterChildrenin interfacePropagatingConfigurationObserver- Parameters:
manager- : to deregister from
-
logLongConfigurationUpdated
-
onConfigurationChange
Description copied from interface:ConfigurationObserverThis method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.- Specified by:
onConfigurationChangein 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 withMasterServicesin order to execute a plan. -
submitSplitPlan
Interacts withMasterServicesin order to execute a plan.
-