@InterfaceAudience.Private public class StatsTrackingRpcRetryingCaller<T> extends RpcRetryingCaller<T>
RpcRetryingCaller
that will update the per-region stats for the call on return,
if stats are availableLOG
Constructor and Description |
---|
StatsTrackingRpcRetryingCaller(long pause,
int retries,
int startLogErrorsCnt,
ServerStatisticTracker stats) |
StatsTrackingRpcRetryingCaller(long pause,
int retries,
org.apache.hadoop.hbase.client.RetryingCallerInterceptor interceptor,
int startLogErrorsCnt,
ServerStatisticTracker stats) |
Modifier and Type | Method and Description |
---|---|
T |
callWithoutRetries(RetryingCallable<T> callable,
int callTimeout)
Call the server once only.
|
T |
callWithRetries(RetryingCallable<T> callable,
int callTimeout)
Retries if invocation fails.
|
cancel, toString
public StatsTrackingRpcRetryingCaller(long pause, int retries, int startLogErrorsCnt, ServerStatisticTracker stats)
public StatsTrackingRpcRetryingCaller(long pause, int retries, org.apache.hadoop.hbase.client.RetryingCallerInterceptor interceptor, int startLogErrorsCnt, ServerStatisticTracker stats)
public T callWithRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
RpcRetryingCaller
callWithRetries
in class RpcRetryingCaller<T>
callable
- The RetryingCallable
to run.callTimeout
- Timeout for this callIOException
- if a remote or network exception occursRuntimeException
- other unspecified errorpublic T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException
RpcRetryingCaller
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 RetryingCallable.call(int)
will not likely
succeed).callWithoutRetries
in class RpcRetryingCaller<T>
IOException
- if a remote or network exception occursRuntimeException
- other unspecified errorCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.