Class HBCKServerCrashProcedure
- All Implemented Interfaces:
Comparable<Procedure<MasterProcedureEnv>>
,ServerProcedureInterface
This version of SCP is for external invocation as part of fix-up (e.g. HBCK2's scheduleRecoveries); the super class is used during normal recovery operations. It is for the case where meta has references to 'Unknown Servers', servers that are in hbase:meta but not in live-server or dead-server lists; i.e. Master and hbase:meta content have deviated. It should never happen in normal running cluster but if we do drop accounting of servers, we need a means of fix-up. Eventually, as part of normal CatalogJanitor task, rather than just identify these 'Unknown Servers', it would make repair, queuing something like this HBCKSCP to do cleanup, reassigning them so Master and hbase:meta are aligned again.
NOTE that this SCP is costly to run; does a full scan of hbase:meta.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final class
Visitor for hbase:meta that 'fixes' Unknown Server issues.Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
StateMachineProcedure.Flow
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
Procedure.LockState
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
ServerProcedureInterface.ServerOperationType
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure
DEFAULT_MASTER_SCP_RETAIN_ASSIGNMENT, MASTER_SCP_RETAIN_ASSIGNMENT
Fields inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
stateCount
Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
ConstructorDescriptionUsed when deserializing from a procedure store; we'll construct one of these then call #deserializeStateData(InputStream).HBCKServerCrashProcedure
(MasterProcedureEnv env, ServerName serverName, boolean shouldSplitWal, boolean carryingMeta) -
Method Summary
Modifier and TypeMethodDescription(package private) List<RegionInfo>
If no Regions found in Master context, then we will search hbase:meta for references to the passed server.protected boolean
The RegionStateNode will not have a location if a confirm of an OPEN fails.Methods inherited from class org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure
abort, acquireLock, deserializeStateData, executeFromState, getInitialState, getProcedureMetrics, getProcName, getServerName, getServerOperationType, getState, getStateId, hasMetaTableRegion, holdLock, isInRecoverMetaState, releaseLock, rollbackState, serializeStateData, setTimeoutFailure, shouldWaitClientAck, toStringClassDetails, updateProgress, updateProgress
Methods inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringState
Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcId, getProcIdHashCode, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, removeStackIndex, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, skipPersistence, suspend, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
-
Field Details
-
LOG
-
-
Constructor Details
-
HBCKServerCrashProcedure
public HBCKServerCrashProcedure(MasterProcedureEnv env, ServerName serverName, boolean shouldSplitWal, boolean carryingMeta) - Parameters:
serverName
- Name of the crashed server.shouldSplitWal
- True if we should split WALs as part of crashed server processing.carryingMeta
- True if carrying hbase:meta table region.
-
HBCKServerCrashProcedure
public HBCKServerCrashProcedure()Used when deserializing from a procedure store; we'll construct one of these then call #deserializeStateData(InputStream). Do not use directly.
-
-
Method Details
-
getRegionsOnCrashedServer
If no Regions found in Master context, then we will search hbase:meta for references to the passed server. Operator may have passed ServerName because they have found references to 'Unknown Servers'. They are using HBCKSCP to clear them out.- Overrides:
getRegionsOnCrashedServer
in classServerCrashProcedure
-
isMatchingRegionLocation
The RegionStateNode will not have a location if a confirm of an OPEN fails. On fail, the RegionStateNode regionLocation is set to null. This is 'looser' than the test done in the superclass. The HBCKSCP has been scheduled by an operator via hbck2 probably at the behest of a report of an 'Unknown Server' in the 'HBCK Report'. Let the operators operation succeed even in case where the region location in the RegionStateNode is null.- Overrides:
isMatchingRegionLocation
in classServerCrashProcedure
- Returns:
- True if the region location in
rsn
matches that of this crashed server.
-