@PublicEvolving public class RetryRejectedExecutionFailureHandler extends Object implements ActionRequestFailureHandler
ActionRequestFailureHandler
that re-adds requests that failed due to temporary
EsRejectedExecutionException
s (which means that Elasticsearch node queues are currently full),
and fails for all other failures.Constructor and Description |
---|
RetryRejectedExecutionFailureHandler() |
Modifier and Type | Method and Description |
---|---|
void |
onFailure(org.elasticsearch.action.ActionRequest action,
Throwable failure,
int restStatusCode,
RequestIndexer indexer)
Handle a failed
ActionRequest . |
public RetryRejectedExecutionFailureHandler()
public void onFailure(org.elasticsearch.action.ActionRequest action, Throwable failure, int restStatusCode, RequestIndexer indexer) throws Throwable
ActionRequestFailureHandler
ActionRequest
.onFailure
in interface ActionRequestFailureHandler
action
- the ActionRequest
that failed due to the failurefailure
- the cause of failurerestStatusCode
- the REST status code of the failure (-1 if none can be retrieved)indexer
- request indexer to re-add the failed action, if intended to do soThrowable
- if the sink should fail on this failure, the implementation should rethrow
the exception or a custom oneCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.