Class SpecificTaskRetryPolicy

java.lang.Object
org.apache.druid.rpc.indexing.SpecificTaskRetryPolicy
All Implemented Interfaces:
ServiceRetryPolicy

public class SpecificTaskRetryPolicy extends Object implements ServiceRetryPolicy
Retry policy for tasks. Meant to be used together with SpecificTaskServiceLocator. Returns true from retryHttpResponse(org.jboss.netty.handler.codec.http.HttpResponse) when encountering an HTTP 400 or HTTP 404 with a ChatHandlerResource.TASK_ID_HEADER header for a different task. This can happen when a task is suspended and then later restored in a different location, and then some *other* task reuses its old port. This task-mismatch scenario is retried indefinitely, since we expect that the SpecificTaskServiceLocator will update the location at some point.