@InterfaceAudience.Private class RegionNormalizerWorker extends Object implements PropagatingConfigurationObserver, Runnable
TableName
s) off the
RegionNormalizerWorkQueue
, dispatches them to the RegionNormalizer
, and executes
the resulting NormalizationPlan
s.Modifier and Type | Field and Description |
---|---|
private boolean |
defaultNormalizerTableLevel |
static String |
HBASE_TABLE_NORMALIZATION_ENABLED |
private static org.slf4j.Logger |
LOG |
private MasterServices |
masterServices |
private long |
mergePlanCount |
(package private) static String |
RATE_LIMIT_BYTES_PER_SEC_KEY |
private static long |
RATE_UNLIMITED_BYTES |
private org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter |
rateLimiter |
private RegionNormalizer |
regionNormalizer |
private long[] |
skippedCount |
private long |
splitPlanCount |
private RegionNormalizerWorkQueue<TableName> |
workQueue |
Constructor and Description |
---|
RegionNormalizerWorker(org.apache.hadoop.conf.Configuration configuration,
MasterServices masterServices,
RegionNormalizer regionNormalizer,
RegionNormalizerWorkQueue<TableName> workQueue) |
Modifier and Type | Method and Description |
---|---|
private 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 |
getMergePlanCount() |
(package private) org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter |
getRateLimiter()
Used in test only.
|
(package private) long |
getSkippedCount(NormalizationPlan.PlanType type) |
(package private) long |
getSplitPlanCount() |
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) |
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
This method would be called by the
ConfigurationManager object when the
Configuration object is reloaded from disk. |
(package private) void |
planSkipped(NormalizationPlan.PlanType type) |
void |
registerChildren(ConfigurationManager manager)
Needs to be called to register the children to the manager.
|
void |
run() |
private void |
submitMergePlan(MergeNormalizationPlan plan)
Interacts with
MasterServices in order to execute a plan. |
private void |
submitPlans(List<NormalizationPlan> plans) |
private void |
submitSplitPlan(SplitNormalizationPlan plan)
Interacts with
MasterServices in order to execute a plan. |
public static final String HBASE_TABLE_NORMALIZATION_ENABLED
private static final org.slf4j.Logger LOG
static final String RATE_LIMIT_BYTES_PER_SEC_KEY
private static final long RATE_UNLIMITED_BYTES
private final MasterServices masterServices
private final RegionNormalizer regionNormalizer
private final RegionNormalizerWorkQueue<TableName> workQueue
private final org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter rateLimiter
private final long[] skippedCount
private final boolean defaultNormalizerTableLevel
private long splitPlanCount
private long mergePlanCount
RegionNormalizerWorker(org.apache.hadoop.conf.Configuration configuration, MasterServices masterServices, RegionNormalizer regionNormalizer, RegionNormalizerWorkQueue<TableName> workQueue)
private boolean extractDefaultNormalizerValue(org.apache.hadoop.conf.Configuration configuration)
public void registerChildren(ConfigurationManager manager)
PropagatingConfigurationObserver
registerChildren
in interface PropagatingConfigurationObserver
manager
- : to register topublic void deregisterChildren(ConfigurationManager manager)
PropagatingConfigurationObserver
deregisterChildren
in interface PropagatingConfigurationObserver
manager
- : to deregister frompublic void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
ConfigurationObserver
ConfigurationManager
object when the
Configuration
object is reloaded from disk.onConfigurationChange
in interface ConfigurationObserver
private static org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter loadRateLimiter(org.apache.hadoop.conf.Configuration configuration)
private static long loadRateLimit(org.apache.hadoop.conf.Configuration configuration)
void planSkipped(NormalizationPlan.PlanType type)
long getSkippedCount(NormalizationPlan.PlanType type)
long getSplitPlanCount()
long getMergePlanCount()
org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter getRateLimiter()
private List<NormalizationPlan> calculatePlans(TableName tableName)
private void submitPlans(List<NormalizationPlan> plans)
private void submitMergePlan(MergeNormalizationPlan plan)
MasterServices
in order to execute a plan.private void submitSplitPlan(SplitNormalizationPlan plan)
MasterServices
in order to execute a plan.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.