Class RegionInTransitionTracker
java.lang.Object
org.apache.hadoop.hbase.master.assignment.RegionInTransitionTracker
Tracks regions that are currently in transition (RIT) - those not yet in their terminal state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<RegionState.State>private final List<RegionState.State>private static final org.slf4j.Loggerprivate final ConcurrentSkipListMap<RegionInfo,RegionStateNode> private TableStateManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanaddRegionInTransition(RegionStateNode regionStateNode) voidhandleRegionDelete(RegionInfo regionInfo) Handles the deletion of a region by removing it from RIT tracking.voidhandleRegionStateNodeOperation(RegionStateNode regionStateNode) Processes a region state change and updates the RIT tracking accordingly.booleanbooleanisRegionInTransition(RegionInfo regionInfo) private booleanisTableEnabled(TableName tableName) voidregionCrashed(RegionStateNode regionStateNode) Handles a region whose hosting RegionServer has crashed.private booleanremoveRegionInTransition(RegionInfo regionInfo) voidsetTableStateManager(TableStateManager tableStateManager) voidstop()
-
Field Details
-
LOG
-
DISABLE_TABLE_REGION_STATE
-
ENABLE_TABLE_REGION_STATE
-
regionInTransition
-
tableStateManager
-
-
Constructor Details
-
RegionInTransitionTracker
public RegionInTransitionTracker()
-
-
Method Details
-
isRegionInTransition
-
regionCrashed
Handles a region whose hosting RegionServer has crashed. When a RegionServer fails, all regions it was hosting are automatically added to the RIT list since they need to be reassigned to other servers. -
handleRegionStateNodeOperation
Processes a region state change and updates the RIT tracking accordingly. This is the core method that determines whether a region should be added to or removed from the RIT list based on its current state and the table's enabled/disabled status. This method should be called whenever a region state changes get stored to hbase:meta Note: Only default replicas (replica ID 0) are tracked. Read replicas are ignored.- Parameters:
regionStateNode- the region state node with the current state information
-
isTableEnabled
-
handleRegionDelete
Handles the deletion of a region by removing it from RIT tracking. This is called when a region is permanently removed from the cluster, typically after a successful merge operation where the parent regions are cleaned up. During table deletion, table should be already disabled and all the region are already OFFLINE- Parameters:
regionInfo- the region being deleted
-
addRegionInTransition
-
removeRegionInTransition
-
stop
-
hasRegionsInTransition
-
getRegionsInTransition
-
setTableStateManager
-