Class RegionNormalizerManager
java.lang.Object
org.apache.hadoop.hbase.master.normalizer.RegionNormalizerManager
- All Implemented Interfaces:
ConfigurationObserver
,PropagatingConfigurationObserver
@Private
public class RegionNormalizerManager
extends Object
implements PropagatingConfigurationObserver
This class encapsulates the details of the
RegionNormalizer
subsystem.-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final ExecutorService
private final RegionNormalizerChore
private final RegionNormalizerStateStore
private boolean
private final Object
private boolean
private final RegionNormalizerWorker
private final RegionNormalizerWorkQueue<TableName>
-
Constructor Summary
ConstructorDescriptionRegionNormalizerManager
(RegionNormalizerStateStore regionNormalizerStateStore, RegionNormalizerChore regionNormalizerChore, RegionNormalizerWorkQueue<TableName> workQueue, RegionNormalizerWorker worker) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deregisterChildren
(ConfigurationManager manager) Needs to be called to deregister the children from the manager.long
Return the number of times aMergeNormalizationPlan
has been submitted.long
Retrieve a count of the number of times plans of typetype
were submitted but skipped.long
Return the number of times aSplitNormalizationPlan
has been submitted.boolean
Returntrue
if region normalizer is on,false
otherwiseboolean
normalizeRegions
(List<TableName> tables, boolean isHighPriority) Submit tables for normalization.void
onConfigurationChange
(org.apache.hadoop.conf.Configuration conf) This method would be called by theConfigurationManager
object when theConfiguration
object is reloaded from disk.void
Call-back for the case where plan couldn't be executed due to constraint violation, such as namespace quota.void
registerChildren
(ConfigurationManager manager) Needs to be called to register the children to the manager.void
setNormalizerOn
(boolean normalizerOn) Set region normalizer on/offvoid
start()
void
stop()
-
Field Details
-
LOG
-
regionNormalizerStateStore
-
regionNormalizerChore
-
workQueue
-
worker
-
pool
-
startStopLock
-
started
-
stopped
-
-
Constructor Details
-
RegionNormalizerManager
RegionNormalizerManager(@NonNull RegionNormalizerStateStore regionNormalizerStateStore, @Nullable RegionNormalizerChore regionNormalizerChore, @Nullable RegionNormalizerWorkQueue<TableName> workQueue, @Nullable RegionNormalizerWorker worker)
-
-
Method Details
-
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
-
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
-
start
-
stop
-
getRegionNormalizerChore
-
isNormalizerOn
Returntrue
if region normalizer is on,false
otherwise -
setNormalizerOn
Set region normalizer on/off- Parameters:
normalizerOn
- whether normalizer should be on or off- Throws:
IOException
-
planSkipped
Call-back for the case where plan couldn't be executed due to constraint violation, such as namespace quota.- Parameters:
type
- type of plan that was skipped.
-
getSkippedCount
Retrieve a count of the number of times plans of typetype
were submitted but skipped.- Parameters:
type
- type of plan for which skipped count is to be returned
-
getSplitPlanCount
Return the number of times aSplitNormalizationPlan
has been submitted. -
getMergePlanCount
Return the number of times aMergeNormalizationPlan
has been submitted. -
normalizeRegions
Submit tables for normalization.- Parameters:
tables
- a list of tables to submit.isHighPriority
-true
when these requested tables should skip to the front of the queue.- Returns:
true
when work was queued,false
otherwise.
-