Class CancellableRegionServerCallable<T>

java.lang.Object
org.apache.hadoop.hbase.client.RegionServerCallable<T,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface>
org.apache.hadoop.hbase.client.ClientServiceCallable<T>
org.apache.hadoop.hbase.client.CancellableRegionServerCallable<T>
All Implemented Interfaces:
Cancellable, RetryingCallable<T>
Direct Known Subclasses:
MultiServerCallable, RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable

@Private abstract class CancellableRegionServerCallable<T> extends ClientServiceCallable<T> implements Cancellable
This class is used to unify HTable calls with AsyncProcess Framework. HTable can use AsyncProcess directly though this class. Also adds global timeout tracking on top of RegionServerCallable and implements Cancellable. Global timeout tracking conflicts with logic in RpcRetryingCallerImpl's callWithRetries. So you can only use this callable in AsyncProcess which only uses callWithoutRetries and retries in its own implementation.
  • Field Details

  • Constructor Details

  • Method Details

    • call

      public T call(int operationTimeout) throws IOException
      Description copied from class: RegionServerCallable
      Override that changes call Exception from Exception to IOException. Also does set up of the rpcController.
      Specified by:
      call in interface RetryingCallable<T>
      Overrides:
      call in class RegionServerCallable<T,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface>
      Parameters:
      operationTimeout - - the time available for this call. 0 for infinite.
      Returns:
      computed result
      Throws:
      IOException
    • prepare

      public void prepare(boolean reload) throws IOException
      Description copied from interface: RetryingCallable
      Prepare by setting up any connections to servers, etc., ahead of call invocation. TODO: We call prepare before EVERY call. Seems wrong. FIX!!!!
      Specified by:
      prepare in interface RetryingCallable<T>
      Overrides:
      prepare in class RegionServerCallable<T,org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ClientService.BlockingInterface>
      Parameters:
      reload - Set this to true if need to requery locations
      Throws:
      IOException - e
    • setStubByServiceName

      protected void setStubByServiceName(ServerName serviceName) throws IOException
      Description copied from class: RegionServerCallable
      Set the RCP client stub
      Overrides:
      setStubByServiceName in class ClientServiceCallable<T>
      Parameters:
      serviceName - to get the rpc stub for
      Throws:
      IOException - When client could not be created
    • cancel

      public void cancel()
      Specified by:
      cancel in interface Cancellable
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • doMulti

      protected org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponse doMulti(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
    • doScan

      protected org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanResponse doScan(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
    • doPrepareBulkLoad

      protected org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadResponse doPrepareBulkLoad(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.PrepareBulkLoadRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
    • doBulkLoadHFile

      protected org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileResponse doBulkLoadHFile(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.BulkLoadHFileRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
    • doCleanupBulkLoad

      protected org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadResponse doCleanupBulkLoad(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CleanupBulkLoadRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
      Throws:
      org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
    • getTracker