@InterfaceAudience.Private public class HBCKServerCrashProcedure extends ServerCrashProcedure
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.
Modifier and Type | Class and Description |
---|---|
private static class |
HBCKServerCrashProcedure.UnknownServerVisitor
Visitor for hbase:meta that 'fixes' Unknown Server issues.
|
StateMachineProcedure.Flow
Procedure.LockState
ServerProcedureInterface.ServerOperationType
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
stateCount
NO_PROC_ID, NO_TIMEOUT
Constructor and Description |
---|
HBCKServerCrashProcedure()
Used 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) |
Modifier and Type | Method and Description |
---|---|
(package private) List<RegionInfo> |
getRegionsOnCrashedServer(MasterProcedureEnv env)
If no Regions found in Master context, then we will search hbase:meta for references
to the passed server.
|
protected boolean |
isMatchingRegionLocation(RegionStateNode rsn)
The RegionStateNode will not have a location if a confirm of an OPEN fails.
|
abort, acquireLock, deserializeStateData, executeFromState, getInitialState, getProcedureMetrics, getProcName, getServerName, getServerOperationType, getState, getStateId, hasMetaTableRegion, holdLock, isInRecoverMetaState, releaseLock, rollbackState, serializeStateData, shouldWaitClientAck, toStringClassDetails, updateProgress, updateProgress
addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringState
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, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, skipPersistence, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
private static final org.slf4j.Logger LOG
public HBCKServerCrashProcedure(MasterProcedureEnv env, ServerName serverName, boolean shouldSplitWal, boolean carryingMeta)
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.public HBCKServerCrashProcedure()
List<RegionInfo> getRegionsOnCrashedServer(MasterProcedureEnv env)
getRegionsOnCrashedServer
in class ServerCrashProcedure
protected boolean isMatchingRegionLocation(RegionStateNode rsn)
isMatchingRegionLocation
in class ServerCrashProcedure
rsn
matches that of this crashed server.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.