org.apache.hadoop.hbase.client
Class RpcRetryingCaller<T>
java.lang.Object
org.apache.hadoop.hbase.client.RpcRetryingCaller<T>
@InterfaceAudience.Private
public class RpcRetryingCaller<T>
- extends Object
Runs an rpc'ing RetryingCallable
. Sets into rpc client
threadlocal outstanding timeouts as so we don't persist too much.
Dynamic rather than static so can set the generic appropriately.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RpcRetryingCaller
public RpcRetryingCaller(org.apache.hadoop.conf.Configuration conf)
callWithRetries
public T callWithRetries(RetryingCallable<T> callable)
throws IOException,
RuntimeException
- Throws:
IOException
RuntimeException
callWithRetries
public T callWithRetries(RetryingCallable<T> callable,
int callTimeout)
throws IOException,
RuntimeException
- Retries if invocation fails.
- Parameters:
callTimeout
- Timeout for this callcallable
- The RetryingCallable
to run.
- 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)
throws IOException,
RuntimeException
- 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).
- Returns:
- an object of type T
- Throws:
IOException
- if a remote or network exception occurs
RuntimeException
- other unspecified error
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.