java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy

@Unstable public class SlidingWindowRetryPolicy extends Object

Sliding window retry policy for relaunching a Container in Yarn.

  • Constructor Summary

    Constructors
    Constructor
    Description
    SlidingWindowRetryPolicy(org.apache.hadoop.yarn.util.Clock clock)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setClock(org.apache.hadoop.yarn.util.Clock clock)
    Sets the clock.
    boolean
    shouldRetry(org.apache.hadoop.yarn.server.nodemanager.containermanager.container.SlidingWindowRetryPolicy.RetryContext retryContext, int errorCode)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 restartTimes which are outside the validity interval.

    • setClock

      public void setClock(org.apache.hadoop.yarn.util.Clock clock)
      Sets the clock.
      Parameters:
      clock - clock