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 |
connectivityFailure
Client connectivity: fixed retries without care for idempotency.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
fail
No retry on network and tangible API issues.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
fixedRetries
Base policy from configuration.
|
protected org.apache.hadoop.io.retry.RetryPolicy |
retryIdempotentCalls
Rejection of all non-idempotent calls except specific failures.
|
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.
|
org.apache.hadoop.io.retry.RetryPolicy.RetryAction |
shouldRetry(Exception exception,
int retries,
int failovers,
boolean idempotent) |
protected final org.apache.hadoop.io.retry.RetryPolicy fixedRetries
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()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.