org.apache.hadoop.hbase.client
Class StatsTrackingRpcRetryingCaller<T>

java.lang.Object
  extended by org.apache.hadoop.hbase.client.RpcRetryingCaller<T>
      extended by org.apache.hadoop.hbase.client.StatsTrackingRpcRetryingCaller<T>

@InterfaceAudience.Private
public class StatsTrackingRpcRetryingCaller<T>
extends RpcRetryingCaller<T>

An RpcRetryingCaller that will update the per-region stats for the call on return, if stats are available


Constructor Summary
StatsTrackingRpcRetryingCaller(long pause, int retries, int startLogErrorsCnt, ServerStatisticTracker stats)
           
 
Method Summary
 T callWithoutRetries(RetryingCallable<T> callable, int callTimeout)
          Call the server once only.
 T callWithRetries(RetryingCallable<T> callable, int callTimeout)
          Retries if invocation fails.
 
Methods inherited from class org.apache.hadoop.hbase.client.RpcRetryingCaller
callWithRetries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatsTrackingRpcRetryingCaller

public StatsTrackingRpcRetryingCaller(long pause,
                                      int retries,
                                      int startLogErrorsCnt,
                                      ServerStatisticTracker stats)
Method Detail

callWithRetries

public T callWithRetries(RetryingCallable<T> callable,
                         int callTimeout)
                  throws IOException,
                         RuntimeException
Description copied from class: RpcRetryingCaller
Retries if invocation fails.

Overrides:
callWithRetries in class RpcRetryingCaller<T>
Parameters:
callable - The RetryingCallable to run.
callTimeout - Timeout for this call
Returns:
an object of type T
Throws:
IOException - if a remote or network exception occurs
RuntimeException - other unspecified error

callWithoutRetries

public T callWithoutRetries(RetryingCallable<T> callable,
                            int callTimeout)
                     throws IOException,
                            RuntimeException
Description copied from class: RpcRetryingCaller
Call the server once only. RetryingCallable has a strange shape so we can do retrys. Use this invocation if you want to do a single call only (A call to Callable.call() will not likely succeed).

Overrides:
callWithoutRetries in class RpcRetryingCaller<T>
Returns:
an object of type T
Throws:
IOException - if a remote or network exception occurs
RuntimeException - other unspecified error


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.