public class S3ARetryPolicy extends Object implements org.apache.hadoop.io.retry.RetryPolicy
S3AUtils.translateException(String, Path, AmazonClientException).
Because the shouldRetry(Exception, int, int, boolean) method
does this translation if an AmazonClientException is processed,
the policy defined for the IOEs also applies to the original exceptions.
Put differently: this retry policy aims to work for handlers of the
untranslated exceptions, as well as the translated ones.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.io.retry.RetryPolicy |
baseExponentialRetry
Exponential policy for the base of normal failures.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
connectivityFailure
Client connectivity: baseExponentialRetry without worrying about whether
or not the command is idempotent.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
fail
No retry on network and tangible API issues.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
retryIdempotentCalls
Idempotent calls which raise IOEs are retried.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
throttlePolicy
Policy for throttle requests, which are considered repeatable, even for
non-idempotent calls, as the service rejected the call entirely.
|
| Constructor and Description |
|---|
S3ARetryPolicy(org.apache.hadoop.conf.Configuration conf)
Instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map<Class<? extends Exception>,org.apache.hadoop.io.retry.RetryPolicy> |
createExceptionMap()
Subclasses can override this like a constructor to change behavior: call
superclass method, then modify it as needed, and return it.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
createThrottleRetryPolicy(org.apache.hadoop.conf.Configuration conf)
Create the throttling policy.
|
protected org.apache.hadoop.conf.Configuration |
getConfiguration()
Get the configuration this policy was created from.
|
org.apache.hadoop.io.retry.RetryPolicy.RetryAction |
shouldRetry(Exception exception,
int retries,
int failovers,
boolean idempotent) |
protected final org.apache.hadoop.io.retry.RetryPolicy baseExponentialRetry
protected final org.apache.hadoop.io.retry.RetryPolicy retryIdempotentCalls
protected final org.apache.hadoop.io.retry.RetryPolicy throttlePolicy
protected final org.apache.hadoop.io.retry.RetryPolicy fail
protected final org.apache.hadoop.io.retry.RetryPolicy connectivityFailure
public S3ARetryPolicy(org.apache.hadoop.conf.Configuration conf)
conf - configuration to read.protected org.apache.hadoop.io.retry.RetryPolicy createThrottleRetryPolicy(org.apache.hadoop.conf.Configuration conf)
conf - configuration to use.protected Map<Class<? extends Exception>,org.apache.hadoop.io.retry.RetryPolicy> createExceptionMap()
public org.apache.hadoop.io.retry.RetryPolicy.RetryAction shouldRetry(Exception exception, int retries, int failovers, boolean idempotent) throws Exception
shouldRetry in interface org.apache.hadoop.io.retry.RetryPolicyExceptionprotected org.apache.hadoop.conf.Configuration getConfiguration()
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.