Uses of Interface
org.apache.hadoop.io.retry.RetryPolicy
Packages that use RetryPolicy
Package
Description
A mechanism for selectively retrying methods that throw exceptions under
certain circumstances.
Tools to help define network clients and servers.
-
Uses of RetryPolicy in org.apache.hadoop.io.retry
Classes in org.apache.hadoop.io.retry that implement RetryPolicyModifier and TypeClassDescriptionstatic classGiven 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.Fields in org.apache.hadoop.io.retry declared as RetryPolicyModifier and TypeFieldDescriptionstatic final RetryPolicyRetryPolicies.RETRY_FOREVERKeep trying forever.static final RetryPolicyRetryPolicies.TRY_ONCE_THEN_FAILTry once, and fail by re-throwing the exception.Methods in org.apache.hadoop.io.retry that return RetryPolicyModifier and TypeMethodDescriptionstatic final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.failoverOnNetworkException(int maxFailovers) static final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers) static final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers, int maxRetries, long delayMillis, long maxDelayBase) static final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers, long delayMillis, long maxDelayBase) static RetryPolicyRetryUtils.getDefaultRetryPolicy(Configuration conf, String retryPolicyEnabledKey, boolean defaultRetryPolicyEnabled, String retryPolicySpecKey, String defaultRetryPolicySpec, String remoteExceptionToRetry) Return the default retry policy set in conf.static RetryPolicyRetryUtils.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 final RetryPolicyRetryPolicies.retryByException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) Set a default policy with some explicit handlers for specific exceptions.static final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.retryForeverWithFixedSleep(long sleepTime, TimeUnit timeUnit) Keep trying forever with a fixed time between attempts.static final RetryPolicyRetryPolicies.retryOtherThanRemoteAndSaslException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) A retry policy where RemoteException and SaslException are not retried, other individual exception types can have RetryPolicy overrides, and any other exception type without an override is not retried.static final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.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.Methods in org.apache.hadoop.io.retry with parameters of type RetryPolicyModifier and TypeMethodDescriptionstatic <T> ObjectRetryProxy.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 givenFailoverProxyProviderand the a set of retry policies specified by method name.static <T> ObjectRetryProxy.create(Class<T> iface, FailoverProxyProvider<T> proxyProvider, RetryPolicy retryPolicy) Create a proxy for an interface of implementations of that interface using the givenFailoverProxyProviderand the same retry policy for each method in the interface.static <T> ObjectRetryProxy.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 final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers) static final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers, int maxRetries, long delayMillis, long maxDelayBase) static final RetryPolicyRetryPolicies.failoverOnNetworkException(RetryPolicy fallbackPolicy, int maxFailovers, long delayMillis, long maxDelayBase) static final RetryPolicyRetryPolicies.retryByException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) Set a default policy with some explicit handlers for specific exceptions.static final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.retryOtherThanRemoteAndSaslException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) A retry policy where RemoteException and SaslException are not retried, other individual exception types can have RetryPolicy overrides, and any other exception type without an override is not retried.Method parameters in org.apache.hadoop.io.retry with type arguments of type RetryPolicyModifier and TypeMethodDescriptionstatic <T> ObjectRetryProxy.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 givenFailoverProxyProviderand the a set of retry policies specified by method name.static <T> ObjectRetryProxy.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 final RetryPolicyRetryPolicies.retryByException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) Set a default policy with some explicit handlers for specific exceptions.static final RetryPolicyRetryPolicies.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 final RetryPolicyRetryPolicies.retryOtherThanRemoteAndSaslException(RetryPolicy defaultPolicy, Map<Class<? extends Exception>, RetryPolicy> exceptionToPolicyMap) A retry policy where RemoteException and SaslException are not retried, other individual exception types can have RetryPolicy overrides, and any other exception type without an override is not retried.Constructors in org.apache.hadoop.io.retry with parameters of type RetryPolicyModifierConstructorDescriptionLossyRetryInvocationHandler(int numToDrop, FailoverProxyProvider<T> proxyProvider, RetryPolicy retryPolicy) protectedRetryInvocationHandler(FailoverProxyProvider<T> proxyProvider, RetryPolicy retryPolicy) protectedRetryInvocationHandler(FailoverProxyProvider<T> proxyProvider, RetryPolicy defaultPolicy, Map<String, RetryPolicy> methodNameToPolicyMap) Constructor parameters in org.apache.hadoop.io.retry with type arguments of type RetryPolicyModifierConstructorDescriptionprotectedRetryInvocationHandler(FailoverProxyProvider<T> proxyProvider, RetryPolicy defaultPolicy, Map<String, RetryPolicy> methodNameToPolicyMap) -
Uses of RetryPolicy in org.apache.hadoop.ipc
Methods in org.apache.hadoop.ipc with parameters of type RetryPolicyModifier and TypeMethodDescriptionstatic <T> ProtocolProxy<T>RPC.getProtocolProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy) Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server.static <T> ProtocolProxy<T>RPC.getProtocolProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth) Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server.static <T> ProtocolProxy<T>RPC.getProtocolProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server.<T> ProtocolProxy<T>ProtobufRpcEngine.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy) Deprecated.<T> ProtocolProxy<T>ProtobufRpcEngine.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) Deprecated.<T> ProtocolProxy<T>ProtobufRpcEngine2.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy) <T> ProtocolProxy<T>ProtobufRpcEngine2.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) <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>RpcEngine.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) Construct a client-side proxy object.<T> ProtocolProxy<T>WritableRpcEngine.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy) Deprecated.Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.<T> ProtocolProxy<T>WritableRpcEngine.getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) Deprecated.Construct a client-side proxy object that implements the named protocol, talking to a server at the named address.static <T> ProtocolProxy<T>RPC.waitForProtocolProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf, int rpcTimeout, RetryPolicy connectionRetryPolicy, long timeout) Get a protocol proxy that contains a proxy connection to a remote server and a set of methods that are supported by the server.Constructors in org.apache.hadoop.ipc with parameters of type RetryPolicyModifierConstructorDescriptionConnectionId(InetSocketAddress address, Class<?> protocol, UserGroupInformation ticket, int rpcTimeout, RetryPolicy connectionRetryPolicy, Configuration conf) protectedInvoker(Class<?> protocol, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext) protectedInvoker(Class<?> protocol, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory, int rpcTimeout, RetryPolicy connectionRetryPolicy, AtomicBoolean fallbackToSimpleAuth, AlignmentContext alignmentContext)