public class RestoreSnapshotProcedure extends AbstractStateMachineTableProcedure<RestoreSnapshotState>
TableProcedureInterface.TableOperationType| Constructor and Description |
|---|
RestoreSnapshotProcedure()
Constructor (for failover)
|
RestoreSnapshotProcedure(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
SnapshotDescription snapshot) |
RestoreSnapshotProcedure(MasterProcedureEnv env,
TableDescriptor tableDescriptor,
SnapshotDescription snapshot,
boolean restoreAcl)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(MasterProcedureEnv env) |
protected void |
deserializeStateData(ProcedureStateSerializer serializer) |
protected Flow |
executeFromState(MasterProcedureEnv env,
RestoreSnapshotState state) |
protected RestoreSnapshotState |
getInitialState() |
protected RestoreSnapshotState |
getState(int stateId) |
protected int |
getStateId(RestoreSnapshotState state) |
TableName |
getTableName() |
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected boolean |
isRollbackSupported(RestoreSnapshotState state) |
protected void |
rollbackState(MasterProcedureEnv env,
RestoreSnapshotState state) |
protected void |
serializeStateData(ProcedureStateSerializer serializer) |
void |
toStringClassDetails(java.lang.StringBuilder sb) |
acquireLock, checkOnline, checkTableModifiable, getRegionDir, getUser, preflightChecks, releaseLock, releaseSyncLatch, setUserpublic RestoreSnapshotProcedure()
public RestoreSnapshotProcedure(MasterProcedureEnv env, TableDescriptor tableDescriptor, SnapshotDescription snapshot) throws HBaseIOException
HBaseIOExceptionpublic RestoreSnapshotProcedure(MasterProcedureEnv env, TableDescriptor tableDescriptor, SnapshotDescription snapshot, boolean restoreAcl) throws HBaseIOException
env - MasterProcedureEnvtableDescriptor - the table to operate onsnapshot - snapshot to restore fromjava.io.IOExceptionHBaseIOExceptionprotected Flow executeFromState(MasterProcedureEnv env, RestoreSnapshotState state) throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, RestoreSnapshotState state) throws java.io.IOException
java.io.IOExceptionprotected boolean isRollbackSupported(RestoreSnapshotState state)
protected RestoreSnapshotState getState(int stateId)
protected int getStateId(RestoreSnapshotState state)
protected RestoreSnapshotState getInitialState()
public TableName getTableName()
getTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineTableProcedure<RestoreSnapshotState>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineTableProcedure<RestoreSnapshotState>public boolean abort(MasterProcedureEnv env)
public void toStringClassDetails(java.lang.StringBuilder sb)
toStringClassDetails in class AbstractStateMachineTableProcedure<RestoreSnapshotState>protected void serializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
java.io.IOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer)
throws java.io.IOException
java.io.IOException