Package | Description |
---|---|
org.apache.hadoop.io.retry |
A mechanism for selectively retrying methods that throw exceptions under
certain circumstances.
|
org.apache.hadoop.ipc |
Tools to help define network clients and servers.
|
Modifier and Type | Class and Description |
---|---|
static class |
RetryPolicies.MultipleLinearRandomRetry
Given pairs of number of retries and sleep time (n0, t0), (n1, t1), ...,
the first n0 retries sleep t0 milliseconds on average,
the following n1 retries sleep t1 milliseconds on average, and so on.
|
Modifier and Type | Field and Description |
---|---|
static RetryPolicy |
RetryPolicies.RETRY_FOREVER
Keep trying forever.
|
static RetryPolicy |
RetryPolicies.TRY_ONCE_THEN_FAIL
Try once, and fail by re-throwing the exception.
|
Modifier and Type | Method and Description |
---|---|
static RetryPolicy |
RetryPolicies.exponentialBackoffRetry(int maxRetries,
long sleepTime,
TimeUnit timeUnit)
Keep trying a limited number of times, waiting a growing amount of time between attempts,
and then fail by re-throwing the exception.
|
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(int maxFailovers) |
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers) |
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers,
int maxRetries,
long delayMillis,
long maxDelayBase) |
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers,
long delayMillis,
long maxDelayBase) |
static RetryPolicy |
RetryUtils.getDefaultRetryPolicy(Configuration conf,
String retryPolicyEnabledKey,
boolean defaultRetryPolicyEnabled,
String retryPolicySpecKey,
String defaultRetryPolicySpec,
String remoteExceptionToRetry)
Return the default retry policy set in conf.
|
static RetryPolicy |
RetryUtils.getMultipleLinearRandomRetry(Configuration conf,
String retryPolicyEnabledKey,
boolean defaultRetryPolicyEnabled,
String retryPolicySpecKey,
String defaultRetryPolicySpec)
Return the MultipleLinearRandomRetry policy specified in the conf,
or null if the feature is disabled.
|
static RetryPolicy |
RetryPolicies.retryByException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryByRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for RemoteException
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryForeverWithFixedSleep(long sleepTime,
TimeUnit timeUnit)
Keep trying forever with a fixed time between attempts.
|
static RetryPolicy |
RetryPolicies.retryOtherThanRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for exceptions other than RemoteException.
|
static RetryPolicy |
RetryPolicies.retryUpToMaximumCountWithFixedSleep(int maxRetries,
long sleepTime,
TimeUnit timeUnit)
Keep trying a limited number of times, waiting a fixed time between attempts,
and then fail by re-throwing the exception.
|
static RetryPolicy |
RetryPolicies.retryUpToMaximumCountWithProportionalSleep(int maxRetries,
long sleepTime,
TimeUnit timeUnit)
Keep trying a limited number of times, waiting a growing amount of time between attempts,
and then fail by re-throwing the exception.
|
static RetryPolicy |
RetryPolicies.retryUpToMaximumTimeWithFixedSleep(long maxTime,
long sleepTime,
TimeUnit timeUnit)
Keep trying for a maximum time, waiting a fixed time between attempts,
and then fail by re-throwing the exception.
|
Modifier and Type | Method and Description |
---|---|
static <T> Object |
RetryProxy.create(Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
Map<String,RetryPolicy> methodNameToPolicyMap,
RetryPolicy defaultPolicy)
Create a proxy for an interface of implementations of that interface using
the given
FailoverProxyProvider and the a set of retry policies
specified by method name. |
static <T> Object |
RetryProxy.create(Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
RetryPolicy retryPolicy)
Create a proxy for an interface of implementations of that interface using
the given
FailoverProxyProvider and the same retry policy for each
method in the interface. |
static <T> Object |
RetryProxy.create(Class<T> iface,
T implementation,
RetryPolicy retryPolicy)
Create a proxy for an interface of an implementation class
using the same retry policy for each method in the interface.
|
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers) |
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers,
int maxRetries,
long delayMillis,
long maxDelayBase) |
static RetryPolicy |
RetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy,
int maxFailovers,
long delayMillis,
long maxDelayBase) |
static RetryPolicy |
RetryPolicies.retryByException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryByRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for RemoteException
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryOtherThanRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for exceptions other than RemoteException.
|
Modifier and Type | Method and Description |
---|---|
static <T> Object |
RetryProxy.create(Class<T> iface,
FailoverProxyProvider<T> proxyProvider,
Map<String,RetryPolicy> methodNameToPolicyMap,
RetryPolicy defaultPolicy)
Create a proxy for an interface of implementations of that interface using
the given
FailoverProxyProvider and the a set of retry policies
specified by method name. |
static <T> Object |
RetryProxy.create(Class<T> iface,
T implementation,
Map<String,RetryPolicy> methodNameToPolicyMap)
Create a proxy for an interface of an implementation class
using the a set of retry policies specified by method name.
|
static RetryPolicy |
RetryPolicies.retryByException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryByRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for RemoteException
Set a default policy with some explicit handlers for specific exceptions.
|
static RetryPolicy |
RetryPolicies.retryOtherThanRemoteException(RetryPolicy defaultPolicy,
Map<Class<? extends Exception>,RetryPolicy> exceptionToPolicyMap)
A retry policy for exceptions other than RemoteException.
|
Modifier and Type | Method and Description |
---|---|
<T> ProtocolProxy<T> |
WritableRpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
<T> ProtocolProxy<T> |
RpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy)
Construct a client-side proxy object.
|
<T> ProtocolProxy<T> |
ProtobufRpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy) |
<T> ProtocolProxy<T> |
WritableRpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy,
AtomicBoolean fallbackToSimpleAuth)
Construct a client-side proxy object that implements the named protocol,
talking to a server at the named address.
|
<T> ProtocolProxy<T> |
RpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy,
AtomicBoolean fallbackToSimpleAuth)
Construct a client-side proxy object.
|
<T> ProtocolProxy<T> |
ProtobufRpcEngine.getProxy(Class<T> protocol,
long clientVersion,
InetSocketAddress addr,
UserGroupInformation ticket,
Configuration conf,
SocketFactory factory,
int rpcTimeout,
RetryPolicy connectionRetryPolicy,
AtomicBoolean fallbackToSimpleAuth) |
Copyright © 2017 Apache Software Foundation. All Rights Reserved.