@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class ContainerRetryContext extends Object
ContainerRetryContext
indicates how container retry after it fails
to run.
It provides details such as:
ContainerRetryPolicy
:
- NEVER_RETRY(DEFAULT value): no matter what error code is when container
fails to run, just do not retry.
- RETRY_ON_ALL_ERRORS: no matter what error code is, when container fails
to run, just retry.
- RETRY_ON_SPECIFIC_ERROR_CODES: when container fails to run, do retry if
the error code is one of errorCodes, otherwise do not retry.
Note: if error code is 137(SIGKILL) or 143(SIGTERM), it will not retry
because it is usually killed on purpose.
Modifier and Type | Field and Description |
---|---|
static ContainerRetryContext |
NEVER_RETRY_CONTEXT |
static int |
RETRY_FOREVER |
static int |
RETRY_INVALID |
Constructor and Description |
---|
ContainerRetryContext() |
Modifier and Type | Method and Description |
---|---|
abstract Set<Integer> |
getErrorCodes() |
abstract int |
getMaxRetries() |
abstract int |
getRetryInterval() |
abstract ContainerRetryPolicy |
getRetryPolicy() |
abstract void |
setErrorCodes(Set<Integer> errorCodes) |
abstract void |
setMaxRetries(int maxRetries) |
abstract void |
setRetryInterval(int retryInterval) |
abstract void |
setRetryPolicy(ContainerRetryPolicy retryPolicy) |
public static final int RETRY_FOREVER
public static final int RETRY_INVALID
public static final ContainerRetryContext NEVER_RETRY_CONTEXT
public abstract ContainerRetryPolicy getRetryPolicy()
public abstract void setRetryPolicy(ContainerRetryPolicy retryPolicy)
public abstract int getMaxRetries()
public abstract void setMaxRetries(int maxRetries)
public abstract int getRetryInterval()
public abstract void setRetryInterval(int retryInterval)
Copyright © 2018 Apache Software Foundation. All rights reserved.