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 Classes
    Modifier and Type
    Class
    Description
    private class 
     
    (package private) class 
     

    Nested 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.ServerOperation

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    private static final AtomicInteger
     
    private static final List<IOException>
     
    (package private) static final String
    Config key for the fail-fast retry limit, shared with the test so the two cannot drift.
    private final int
     
    private static final AtomicBoolean
     
    private static final org.slf4j.Logger
     
    private static org.apache.hadoop.hbase.TableName
     
    private static final AtomicInteger
     

    Fields inherited from class org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher

    master, RS_RPC_STARTUP_WAIT_TIME_CONF_KEY

    Fields 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
    Constructor
    Description
    RSProcDispatcher(org.apache.hadoop.hbase.master.MasterServices master)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
    injectErrorsForNextRequests(org.apache.hadoop.hbase.TableName table, int n)
    Fails the next n open/close-region requests for table with connection errors until the fail-fast retry limit is exhausted, so the master schedules an SCP.
    protected void
    remoteDispatch(org.apache.hadoop.hbase.ServerName serverName, Set<org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure> remoteProcedures)
     
    (package private) static void
    Stops error injection.
    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.

    Methods inherited from class org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher

    abortPendingOperations, getUncaughtExceptionHandler, serverAdded, serverRemoved, splitAndResolveOperation, start, stop

    Methods inherited from class org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher

    addNode, addOperationToNode, buildAndGroupRequestByType, fetchType, hasNode, join, removeCompletedOperation, removeNode, setTimeoutExecutorUncaughtExceptionHandler, submitTask, submitTask

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.hadoop.hbase.master.ServerListener

    waiting
  • Field Details

  • Constructor Details

    • RSProcDispatcher

      public RSProcDispatcher(org.apache.hadoop.hbase.master.MasterServices master)
  • Method Details

    • injectErrorsForNextRequests

      static void injectErrorsForNextRequests(org.apache.hadoop.hbase.TableName table, int n)
      Fails the next n open/close-region requests for table with connection errors until the fail-fast retry limit is exhausted, so the master schedules an SCP. Call right before the operations under test.
    • stopInjecting

      static void 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:
      remoteDispatch in class org.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.