@InterfaceAudience.Private public class AssignmentManager extends Object
RegionStates
.RegionStateStore
.Modifier and Type | Class and Description |
---|---|
private static class |
AssignmentManager.DeadServerMetricRegionChore |
private static class |
AssignmentManager.RegionInTransitionChore |
static class |
AssignmentManager.RegionInTransitionStat |
private class |
AssignmentManager.RegionMetaLoadingVisitor |
Constructor and Description |
---|
AssignmentManager(MasterServices master) |
AssignmentManager(MasterServices master,
RegionStateStore stateStore) |
Modifier and Type | Method and Description |
---|---|
private void |
acceptPlan(HashMap<RegionInfo,RegionStateNode> regions,
Map<ServerName,List<RegionInfo>> plan) |
private void |
addToPendingAssignment(HashMap<RegionInfo,RegionStateNode> regions,
Collection<RegionInfo> pendingRegions) |
long |
assign(RegionInfo regionInfo) |
long |
assign(RegionInfo regionInfo,
ServerName sn) |
Future<byte[]> |
assignAsync(RegionInfo regionInfo)
Submits a procedure that assigns a region without waiting for it to finish
|
Future<byte[]> |
assignAsync(RegionInfo regionInfo,
ServerName sn)
Submits a procedure that assigns a region to a target server without waiting for it to finish
|
private void |
assignQueueSignal() |
void |
checkIfShouldMoveSystemRegionAsync()
Start a new thread to check if there are region servers whose versions are higher than others.
|
private void |
checkMetaLoaded(RegionInfo hri)
Used to check if the meta loading is done.
|
private void |
checkOnlineRegionsReport(ServerStateNode serverNode,
Set<byte[]> regionNames)
Check that what the RegionServer reports aligns with the Master's image.
|
private void |
closeRegionSilently(ServerName sn,
byte[] regionName)
Close
regionName on sn silently and immediately without
using a Procedure or going via hbase:meta. |
(package private) static int |
compare(TransitRegionStateProcedure left,
TransitRegionStateProcedure right) |
AssignmentManager.RegionInTransitionStat |
computeRegionInTransitionStat() |
private boolean |
containsBogusAssignments(Map<RegionInfo,RegionStateNode> regions,
List<RegionInfo> hirs) |
private TransitRegionStateProcedure |
createAssignProcedure(RegionInfo regionInfo,
ServerName sn) |
private TransitRegionStateProcedure |
createAssignProcedure(RegionStateNode regionNode,
ServerName targetServer,
boolean override) |
TransitRegionStateProcedure[] |
createAssignProcedures(List<RegionInfo> hris)
Create an array of TransitRegionStateProcedure w/o specifying a target server.
|
private TransitRegionStateProcedure[] |
createAssignProcedures(Map<ServerName,List<RegionInfo>> assignments) |
MergeTableRegionsProcedure |
createMergeProcedure(RegionInfo... ris) |
TransitRegionStateProcedure |
createMoveRegionProcedure(RegionInfo regionInfo,
ServerName targetServer) |
TransitRegionStateProcedure |
createOneAssignProcedure(RegionInfo hri,
boolean override)
Create one TransitRegionStateProcedure to assign a region w/o specifying a target server.
|
TransitRegionStateProcedure |
createOneUnassignProcedure(RegionInfo hri,
boolean override)
Create one TransitRegionStateProcedure to unassign a region.
|
TransitRegionStateProcedure[] |
createRoundRobinAssignProcedures(List<RegionInfo> hris)
Create round-robin assigns.
|
TransitRegionStateProcedure[] |
createRoundRobinAssignProcedures(List<RegionInfo> hris,
List<ServerName> serversToExclude)
Create round-robin assigns.
|
SplitTableRegionProcedure |
createSplitProcedure(RegionInfo regionToSplit,
byte[] splitKey) |
private TransitRegionStateProcedure |
createUnassignProcedure(RegionStateNode regionNode,
boolean override) |
TransitRegionStateProcedure[] |
createUnassignProceduresForDisabling(TableName tableName)
Called by DisableTableProcedure to unassign all the regions for a table.
|
void |
deleteTable(TableName tableName)
Delete the region states.
|
List<RegionInfo> |
getAssignedRegions() |
(package private) int |
getAssignMaxAttempts() |
MetricsAssignmentManager |
getAssignmentManagerMetrics() |
(package private) int |
getAssignRetryImmediatelyMaxAttempts() |
private LoadBalancer |
getBalancer() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
List<ServerName> |
getExcludedServersForSystemTable()
Get a list of servers that this region cannot be assigned to.
|
List<ServerName> |
getFavoredNodes(RegionInfo regionInfo) |
(package private) MasterServices |
getMaster() |
private ProcedureEvent<?> |
getMetaAssignEvent(RegionInfo metaRegionInfo) |
private RegionInfo |
getMetaForRegion(RegionInfo regionInfo) |
RegionInfo |
getMetaRegionFromName(byte[] regionName) |
Set<RegionInfo> |
getMetaRegionSet() |
int |
getNumRegionsOpened() |
private MasterProcedureEnv |
getProcedureEnvironment() |
private MasterProcedureScheduler |
getProcedureScheduler() |
RegionInfo |
getRegionInfo(byte[] regionName) |
List<RegionStateNode> |
getRegionsInTransition() |
List<RegionInfo> |
getRegionsOnServer(ServerName serverName)
Returns the regions hosted by the specified server.
|
RegionStates |
getRegionStates() |
RegionStatesCount |
getRegionStatesCount(TableName tableName)
Provide regions state count for given table.
|
RegionStateStore |
getRegionStateStore() |
Pair<Integer,Integer> |
getReopenStatus(TableName tableName)
Used by the client (via master) to identify if all regions have the schema updates
|
Map<ServerName,Set<byte[]>> |
getRSReports() |
Map<ServerName,List<RegionInfo>> |
getSnapShotOfAssignment(Collection<RegionInfo> regions) |
private List<RegionInfo> |
getSystemTables(ServerName serverName) |
(package private) TableStateManager |
getTableStateManager() |
private void |
handleRegionOverStuckWarningThreshold(RegionInfo regionInfo) |
boolean |
hasRegionsInTransition() |
boolean |
isCarryingMeta(ServerName serverName) |
private boolean |
isCarryingRegion(ServerName serverName,
RegionInfo regionInfo) |
boolean |
isMetaAssigned()
Notice that, this only means the meta region is available on a RS, but the AM may still be
loading the region states from meta, so usually you need to check
isMetaLoaded() first
before checking this method, unless you can make sure that your piece of code can only be
executed after AM builds the region states. |
boolean |
isMetaLoaded()
Return whether AM finishes the meta loading, i.e, the region states rebuilding.
|
boolean |
isMetaRegion(byte[] regionName) |
private boolean |
isMetaRegion(RegionInfo regionInfo) |
boolean |
isMetaRegionInTransition() |
boolean |
isRunning() |
boolean |
isTableDisabled(TableName tableName) |
boolean |
isTableEnabled(TableName tableName) |
void |
joinCluster() |
private void |
loadMeta() |
RegionInfo |
loadRegionFromMeta(String regionEncodedName)
Query META if the given
RegionInfo exists, adding to
AssignmentManager.regionStateStore cache if the region is found in META. |
void |
markRegionAsMerged(RegionInfo child,
ServerName serverName,
RegionInfo[] mergeParents)
When called here, the merge has happened.
|
void |
markRegionAsSplit(RegionInfo parent,
ServerName serverName,
RegionInfo daughterA,
RegionInfo daughterB) |
void |
move(RegionInfo regionInfo) |
Future<byte[]> |
moveAsync(RegionPlan regionPlan) |
void |
offlineRegion(RegionInfo regionInfo) |
void |
onlineRegion(RegionInfo regionInfo,
ServerName serverName) |
(package private) void |
persistToMeta(RegionStateNode regionNode) |
private void |
preTransitCheck(RegionStateNode regionNode,
RegionState.State[] expectedStates) |
private void |
processAssignmentPlans(HashMap<RegionInfo,RegionStateNode> regions,
HashMap<RegionInfo,ServerName> retainMap,
List<RegionInfo> hris,
List<ServerName> servers) |
private void |
processAssignQueue() |
void |
processOfflineRegions()
Create assign procedure for offline regions.
|
protected void |
queueAssign(RegionStateNode regionNode)
Add the assign operation to the assignment queue.
|
void |
regionClosedAbnormally(RegionStateNode regionNode) |
(package private) void |
regionClosedWithoutPersistingToMeta(RegionStateNode regionNode) |
(package private) void |
regionClosing(RegionStateNode regionNode) |
(package private) void |
regionFailedOpen(RegionStateNode regionNode,
boolean giveUp) |
(package private) void |
regionOpenedWithoutPersistingToMeta(RegionStateNode regionNode) |
(package private) void |
regionOpening(RegionStateNode regionNode) |
void |
reportOnlineRegions(ServerName serverName,
Set<byte[]> regionNames)
The master will call this method when the RS send the regionServerReport().
|
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionResponse |
reportRegionStateTransition(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest req) |
private void |
reportRegionStateTransition(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionResponse.Builder builder,
ServerName serverName,
List<org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition> transitionList) |
private boolean |
reportTransition(RegionStateNode regionNode,
ServerStateNode serverNode,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state,
long seqId,
long procId) |
private void |
setMetaAssigned(RegionInfo metaRegionInfo,
boolean assigned) |
void |
setupRIT(List<TransitRegionStateProcedure> procs)
Create RegionStateNode based on the TRSP list, and attach the TRSP to the RegionStateNode.
|
private boolean |
shouldAssignFavoredNodes(RegionInfo region) |
void |
start() |
private void |
startAssignmentThread() |
void |
stop() |
private void |
stopAssignmentThread() |
long |
submitServerCrash(ServerName serverName,
boolean shouldSplitWal,
boolean force)
Usually run by the Master in reaction to server crash during normal processing.
|
private void |
transitStateAndUpdate(RegionStateNode regionNode,
RegionState.State newState,
RegionState.State... expectedStates) |
long |
unassign(RegionInfo regionInfo) |
private void |
updateDeadServerRegionMetrics(int deadRegions,
int unknownRegions) |
private void |
updateRegionMergeTransition(ServerName serverName,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state,
RegionInfo merged,
RegionInfo hriA,
RegionInfo hriB) |
private void |
updateRegionsInTransitionMetrics(AssignmentManager.RegionInTransitionStat ritStat) |
private void |
updateRegionSplitTransition(ServerName serverName,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state,
RegionInfo parent,
RegionInfo hriA,
RegionInfo hriB) |
private void |
updateRegionTransition(ServerName serverName,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state,
RegionInfo regionInfo,
long seqId,
long procId) |
boolean |
waitMetaAssigned(Procedure<?> proc,
RegionInfo regionInfo)
Notice that this event does not mean the AM has already finished region state rebuilding.
|
boolean |
waitMetaLoaded(Procedure<?> proc)
Wait until AM finishes the meta loading, i.e, the region states rebuilding.
|
private HashMap<RegionInfo,RegionStateNode> |
waitOnAssignQueue() |
(package private) void |
wakeMetaLoadedEvent() |
private static final org.slf4j.Logger LOG
public static final String BOOTSTRAP_THREAD_POOL_SIZE_CONF_KEY
public static final String ASSIGN_DISPATCH_WAIT_MSEC_CONF_KEY
private static final int DEFAULT_ASSIGN_DISPATCH_WAIT_MSEC
public static final String ASSIGN_DISPATCH_WAITQ_MAX_CONF_KEY
private static final int DEFAULT_ASSIGN_DISPATCH_WAITQ_MAX
public static final String RIT_CHORE_INTERVAL_MSEC_CONF_KEY
private static final int DEFAULT_RIT_CHORE_INTERVAL_MSEC
public static final String DEAD_REGION_METRIC_CHORE_INTERVAL_MSEC_CONF_KEY
private static final int DEFAULT_DEAD_REGION_METRIC_CHORE_INTERVAL_MSEC
public static final String ASSIGN_MAX_ATTEMPTS
private static final int DEFAULT_ASSIGN_MAX_ATTEMPTS
public static final String ASSIGN_RETRY_IMMEDIATELY_MAX_ATTEMPTS
private static final int DEFAULT_ASSIGN_RETRY_IMMEDIATELY_MAX_ATTEMPTS
public static final String METRICS_RIT_STUCK_WARNING_THRESHOLD
private static final int DEFAULT_RIT_STUCK_WARNING_THRESHOLD
private final ProcedureEvent<?> metaAssignEvent
private final ProcedureEvent<?> metaLoadEvent
private final MetricsAssignmentManager metrics
private final AssignmentManager.RegionInTransitionChore ritChore
private final AssignmentManager.DeadServerMetricRegionChore deadMetricChore
private final MasterServices master
private final AtomicBoolean running
private final RegionStates regionStates
private final RegionStateStore regionStateStore
private final Map<ServerName,Set<byte[]>> rsReports
private final boolean shouldAssignRegionsWithFavoredNodes
private final int assignDispatchWaitQueueMaxSize
private final int assignDispatchWaitMillis
private final int assignMaxAttempts
private final int assignRetryImmediatelyMaxAttempts
private final Object checkIfShouldMoveSystemRegionLock
private Thread assignThread
private static final Set<RegionInfo> META_REGION_SET
private static final RegionState.State[] STATES_EXPECTED_ON_OPEN
private static final RegionState.State[] STATES_EXPECTED_ON_CLOSING
private static final RegionState.State[] STATES_EXPECTED_ON_CLOSED
private static final RegionState.State[] STATES_EXPECTED_ON_ASSIGN
private static final RegionState.State[] STATES_EXPECTED_ON_UNASSIGN_OR_MOVE
private final ArrayList<RegionStateNode> pendingAssignQueue
private final ReentrantLock assignQueueLock
private final Condition assignQueueFullCond
public AssignmentManager(MasterServices master)
AssignmentManager(MasterServices master, RegionStateStore stateStore)
public void start() throws IOException, org.apache.zookeeper.KeeperException
IOException
org.apache.zookeeper.KeeperException
public void setupRIT(List<TransitRegionStateProcedure> procs)
This is used to restore the RIT region list, so we do not need to restore it in the loadingMeta method below. And it is also very important as now before submitting a TRSP, we need to attach it to the RegionStateNode, which acts like a guard, so we need to restore this information at the very beginning, before we start processing any procedures.
public void stop()
public boolean isRunning()
public org.apache.hadoop.conf.Configuration getConfiguration()
public MetricsAssignmentManager getAssignmentManagerMetrics()
private LoadBalancer getBalancer()
private MasterProcedureEnv getProcedureEnvironment()
private MasterProcedureScheduler getProcedureScheduler()
int getAssignMaxAttempts()
int getAssignRetryImmediatelyMaxAttempts()
public RegionStates getRegionStates()
public List<RegionInfo> getRegionsOnServer(ServerName serverName)
public RegionStateStore getRegionStateStore()
public List<ServerName> getFavoredNodes(RegionInfo regionInfo)
TableStateManager getTableStateManager()
public boolean isTableEnabled(TableName tableName)
public boolean isTableDisabled(TableName tableName)
private boolean isMetaRegion(RegionInfo regionInfo)
public boolean isMetaRegion(byte[] regionName)
public RegionInfo getMetaRegionFromName(byte[] regionName)
public boolean isCarryingMeta(ServerName serverName)
private boolean isCarryingRegion(ServerName serverName, RegionInfo regionInfo)
private RegionInfo getMetaForRegion(RegionInfo regionInfo)
public Set<RegionInfo> getMetaRegionSet()
public boolean isMetaAssigned()
isMetaLoaded()
first
before checking this method, unless you can make sure that your piece of code can only be
executed after AM builds the region states.isMetaLoaded()
public boolean isMetaRegionInTransition()
public boolean waitMetaAssigned(Procedure<?> proc, RegionInfo regionInfo)
isMetaAssigned()
for more details.isMetaAssigned()
private void setMetaAssigned(RegionInfo metaRegionInfo, boolean assigned)
private ProcedureEvent<?> getMetaAssignEvent(RegionInfo metaRegionInfo)
public boolean waitMetaLoaded(Procedure<?> proc)
void wakeMetaLoadedEvent()
public boolean isMetaLoaded()
isMetaAssigned()
,
waitMetaLoaded(Procedure)
public void checkIfShouldMoveSystemRegionAsync()
This method is called when a new RegionServer is added to cluster only.
private List<RegionInfo> getSystemTables(ServerName serverName)
private void preTransitCheck(RegionStateNode regionNode, RegionState.State[] expectedStates) throws HBaseIOException
HBaseIOException
private TransitRegionStateProcedure createAssignProcedure(RegionInfo regionInfo, ServerName sn) throws IOException
IOException
public long assign(RegionInfo regionInfo, ServerName sn) throws IOException
IOException
public long assign(RegionInfo regionInfo) throws IOException
IOException
public Future<byte[]> assignAsync(RegionInfo regionInfo, ServerName sn) throws IOException
regionInfo
- the region we would like to assignsn
- target server nameIOException
public Future<byte[]> assignAsync(RegionInfo regionInfo) throws IOException
regionInfo
- the region we would like to assignIOException
public long unassign(RegionInfo regionInfo) throws IOException
IOException
public TransitRegionStateProcedure createMoveRegionProcedure(RegionInfo regionInfo, ServerName targetServer) throws HBaseIOException
HBaseIOException
public void move(RegionInfo regionInfo) throws IOException
IOException
public Future<byte[]> moveAsync(RegionPlan regionPlan) throws HBaseIOException
HBaseIOException
public TransitRegionStateProcedure[] createRoundRobinAssignProcedures(List<RegionInfo> hris, List<ServerName> serversToExclude)
hris
and a call to the balancer
to populate the assigns with targets chosen using round-robin (default balancer
scheme). If at assign-time, the target chosen is no longer up, thats fine, the
AssignProcedure will ask the balancer for a new target, and so on.public TransitRegionStateProcedure[] createRoundRobinAssignProcedures(List<RegionInfo> hris)
hris
and a call to the balancer
to populate the assigns with targets chosen using round-robin (default balancer
scheme). If at assign-time, the target chosen is no longer up, thats fine, the
AssignProcedure will ask the balancer for a new target, and so on.static int compare(TransitRegionStateProcedure left, TransitRegionStateProcedure right)
private TransitRegionStateProcedure createAssignProcedure(RegionStateNode regionNode, ServerName targetServer, boolean override)
private TransitRegionStateProcedure createUnassignProcedure(RegionStateNode regionNode, boolean override)
public TransitRegionStateProcedure createOneAssignProcedure(RegionInfo hri, boolean override)
public TransitRegionStateProcedure createOneUnassignProcedure(RegionInfo hri, boolean override)
public TransitRegionStateProcedure[] createAssignProcedures(List<RegionInfo> hris)
private TransitRegionStateProcedure[] createAssignProcedures(Map<ServerName,List<RegionInfo>> assignments)
assignments
- Map of assignments from which we produce an array of AssignProcedures.assignments
public TransitRegionStateProcedure[] createUnassignProceduresForDisabling(TableName tableName)
public SplitTableRegionProcedure createSplitProcedure(RegionInfo regionToSplit, byte[] splitKey) throws IOException
IOException
public MergeTableRegionsProcedure createMergeProcedure(RegionInfo... ris) throws IOException
IOException
public void deleteTable(TableName tableName) throws IOException
IOException
private void reportRegionStateTransition(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionResponse.Builder builder, ServerName serverName, List<org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition> transitionList) throws IOException
IOException
public org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionResponse reportRegionStateTransition(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest req) throws PleaseHoldException
PleaseHoldException
private void updateRegionTransition(ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state, RegionInfo regionInfo, long seqId, long procId) throws IOException
IOException
private boolean reportTransition(RegionStateNode regionNode, ServerStateNode serverNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state, long seqId, long procId) throws IOException
IOException
private void updateRegionSplitTransition(ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state, RegionInfo parent, RegionInfo hriA, RegionInfo hriB) throws IOException
IOException
private void updateRegionMergeTransition(ServerName serverName, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode state, RegionInfo merged, RegionInfo hriA, RegionInfo hriB) throws IOException
IOException
public void reportOnlineRegions(ServerName serverName, Set<byte[]> regionNames)
private void closeRegionSilently(ServerName sn, byte[] regionName)
regionName
on sn
silently and immediately without
using a Procedure or going via hbase:meta. For case where a RegionServer's hosting
of a Region is not aligned w/ the Master's accounting of Region state. This is for
cleaning up an error in accounting.private void checkOnlineRegionsReport(ServerStateNode serverNode, Set<byte[]> regionNames)
public AssignmentManager.RegionInTransitionStat computeRegionInTransitionStat()
private void updateRegionsInTransitionMetrics(AssignmentManager.RegionInTransitionStat ritStat)
private void updateDeadServerRegionMetrics(int deadRegions, int unknownRegions)
private void handleRegionOverStuckWarningThreshold(RegionInfo regionInfo)
public void joinCluster() throws IOException
IOException
public void processOfflineRegions()
public RegionInfo loadRegionFromMeta(String regionEncodedName) throws UnknownRegionException
RegionInfo
exists, adding to
AssignmentManager.regionStateStore
cache if the region is found in META.regionEncodedName
- encoded name for the region to be loaded from META into
AssignmentManager.regionStateStore
cacheRegionInfo
instance for the given region if it is present in META
and got successfully loaded into AssignmentManager.regionStateStore
cache, null otherwise.UnknownRegionException
- if any errors occur while querying meta.private void loadMeta() throws IOException
IOException
private void checkMetaLoaded(RegionInfo hri) throws PleaseHoldException
hri
- region to check if it is already rebuildPleaseHoldException
- if meta has not been loaded yetpublic int getNumRegionsOpened()
public long submitServerCrash(ServerName serverName, boolean shouldSplitWal, boolean force)
force
- Set if the request came in externally over RPC (via hbck2). Force means
run the SCP even if it seems as though there might be an outstanding
SCP running.Procedure.NO_PROC_ID
if none scheduled.public void offlineRegion(RegionInfo regionInfo)
public void onlineRegion(RegionInfo regionInfo, ServerName serverName)
public Map<ServerName,List<RegionInfo>> getSnapShotOfAssignment(Collection<RegionInfo> regions)
public Pair<Integer,Integer> getReopenStatus(TableName tableName)
tableName
- IOException
public boolean hasRegionsInTransition()
public List<RegionStateNode> getRegionsInTransition()
public List<RegionInfo> getAssignedRegions()
public RegionInfo getRegionInfo(byte[] regionName)
private void transitStateAndUpdate(RegionStateNode regionNode, RegionState.State newState, RegionState.State... expectedStates) throws IOException
IOException
void regionOpening(RegionStateNode regionNode) throws IOException
IOException
void regionFailedOpen(RegionStateNode regionNode, boolean giveUp) throws IOException
IOException
void regionClosing(RegionStateNode regionNode) throws IOException
IOException
void regionOpenedWithoutPersistingToMeta(RegionStateNode regionNode) throws IOException
IOException
void regionClosedWithoutPersistingToMeta(RegionStateNode regionNode) throws IOException
IOException
public void regionClosedAbnormally(RegionStateNode regionNode) throws IOException
IOException
void persistToMeta(RegionStateNode regionNode) throws IOException
IOException
public void markRegionAsSplit(RegionInfo parent, ServerName serverName, RegionInfo daughterA, RegionInfo daughterB) throws IOException
IOException
public void markRegionAsMerged(RegionInfo child, ServerName serverName, RegionInfo[] mergeParents) throws IOException
IOException
private boolean shouldAssignFavoredNodes(RegionInfo region)
protected void queueAssign(RegionStateNode regionNode)
private void startAssignmentThread()
private void stopAssignmentThread()
private void assignQueueSignal()
private HashMap<RegionInfo,RegionStateNode> waitOnAssignQueue()
private void processAssignQueue()
private boolean containsBogusAssignments(Map<RegionInfo,RegionStateNode> regions, List<RegionInfo> hirs)
private void processAssignmentPlans(HashMap<RegionInfo,RegionStateNode> regions, HashMap<RegionInfo,ServerName> retainMap, List<RegionInfo> hris, List<ServerName> servers)
private void acceptPlan(HashMap<RegionInfo,RegionStateNode> regions, Map<ServerName,List<RegionInfo>> plan) throws HBaseIOException
HBaseIOException
private void addToPendingAssignment(HashMap<RegionInfo,RegionStateNode> regions, Collection<RegionInfo> pendingRegions)
public List<ServerName> getExcludedServersForSystemTable()
MasterServices getMaster()
public Map<ServerName,Set<byte[]>> getRSReports()
public RegionStatesCount getRegionStatesCount(TableName tableName)
tableName
- TableNameCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.