We support sliding window retry policy for AM restarts (Introduced in
YARN-611). Similar sliding window retry policy is needed for container restarts.
With this change, we can introduce a common class for SlidingWindowRetryPolicy ( suggested by Varun Vasudev in the comments) and integrate it to container restart.
In a subsequent jira, we can modify the AM code to use SlidingWindowRetryPolicy which will unify the AM and container restart code.