Class SlidingWindowRetryPolicy
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy
Sliding window retry policy for relaunching a
Container in Yarn.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetClock(org.apache.hadoop.yarn.util.Clock clock) Sets the clock.booleanshouldRetry(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy.RetryContext retryContext, int errorCode) protected voidupdateRetryContext(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy.RetryContext retryContext) Updates remaining retries and the restart time when required in the retryContext.
-
Constructor Details
-
SlidingWindowRetryPolicy
public SlidingWindowRetryPolicy(org.apache.hadoop.yarn.util.Clock clock)
-
-
Method Details
-
shouldRetry
public boolean shouldRetry(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy.RetryContext retryContext, int errorCode) -
updateRetryContext
protected void updateRetryContext(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy.RetryContext retryContext) Updates remaining retries and the restart time when required in the retryContext.When failuresValidityInterval is > 0, it also removes time entries from
restartTimeswhich are outside the validity interval. -
setClock
public void setClock(org.apache.hadoop.yarn.util.Clock clock) Sets the clock.- Parameters:
clock- clock
-