Package org.apache.hadoop.hbase.util
Class RSProcDispatcher
java.lang.Object
org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,org.apache.hadoop.hbase.ServerName>
org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
org.apache.hadoop.hbase.util.RSProcDispatcher
- All Implemented Interfaces:
org.apache.hadoop.hbase.master.ServerListener
public class RSProcDispatcher
extends org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
Test implementation of RSProcedureDispatcher that throws desired errors for testing purpose.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class(package private) classNested classes/interfaces inherited from class org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.ExecuteProceduresRemoteCall, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.RegionCloseOperation, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.RegionOpenOperation, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.RegionOperation, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher.ServerOperationNested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.BufferNode, org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteNode<TEnv extends Object,TRemote extends Object>, org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteOperation, org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure<TEnv extends Object, TRemote extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AtomicIntegerprivate static final List<IOException>(package private) static final StringConfig key for the fail-fast retry limit, shared with the test so the two cannot drift.private final intprivate static final AtomicBooleanprivate static final org.slf4j.Loggerprivate static org.apache.hadoop.hbase.TableNameprivate static final AtomicIntegerFields inherited from class org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
master, RS_RPC_STARTUP_WAIT_TIME_CONF_KEYFields inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
DISPATCH_DELAY_CONF_KEY, DISPATCH_MAX_QUEUE_SIZE_CONF_KEY, THREAD_POOL_SIZE_CONF_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidinjectErrorsForNextRequests(org.apache.hadoop.hbase.TableName table, int n) Fails the nextnopen/close-region requests fortablewith connection errors until the fail-fast retry limit is exhausted, so the master schedules an SCP.protected voidremoteDispatch(org.apache.hadoop.hbase.ServerName serverName, Set<org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures) (package private) static voidStops error injection.private static booleantargetsInjectionTable(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresRequest request) True if the request opens or closes a region of the injection target table.Methods inherited from class org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
abortPendingOperations, getUncaughtExceptionHandler, serverAdded, serverRemoved, splitAndResolveOperation, start, stopMethods inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher
addNode, addOperationToNode, buildAndGroupRequestByType, fetchType, hasNode, join, removeCompletedOperation, removeNode, setTimeoutExecutorUncaughtExceptionHandler, submitTask, submitTaskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.master.ServerListener
waiting
-
Field Details
-
LOG
-
FAIL_FAST_LIMIT_KEY
Config key for the fail-fast retry limit, shared with the test so the two cannot drift.- See Also:
-
ERRORS
-
ERROR_IDX
-
INJECT
-
VICTIMS_REMAINING
-
targetTable
-
failFastLimit
-
-
Constructor Details
-
RSProcDispatcher
-
-
Method Details
-
injectErrorsForNextRequests
Fails the nextnopen/close-region requests fortablewith connection errors until the fail-fast retry limit is exhausted, so the master schedules an SCP. Call right before the operations under test. -
stopInjecting
Stops error injection. Safe to call unconditionally, e.g. from test teardown. -
remoteDispatch
protected void remoteDispatch(org.apache.hadoop.hbase.ServerName serverName, Set<org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures) - Overrides:
remoteDispatchin classorg.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher
-
targetsInjectionTable
private static boolean targetsInjectionTable(org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ExecuteProceduresRequest request) True if the request opens or closes a region of the injection target table. Open requests carry a full RegionInfo; close requests carry a REGION_NAME specifier the table is parsed from.
-