Package org.elasticsearch.hadoop.handler
Interface ErrorCollector<T>
public interface ErrorCollector<T>
An interface for accepting modified information to be retried in the event of a recoverable failure.
-
Method Summary
Modifier and TypeMethodDescriptionSignal that a failure could not be handled by this handler and pass the record on to the next handler.retry()Retry an operation using the same data from the previous operation.Retry an operation using the given retry data
-
Method Details
-
retry
HandlerResult retry()Retry an operation using the same data from the previous operation.- Returns:
- Appropriate handler result value stating the failure has been retried. In
most cases this is
HandlerResult.HANDLEDbut can vary depending on the use case.
-
retry
Retry an operation using the given retry data- Parameters:
retryData- operation/data to retry- Returns:
- Appropriate handler result value stating the failure has been retried. In
most cases this is
HandlerResult.HANDLEDbut can vary depending on the use case.
-
pass
Signal that a failure could not be handled by this handler and pass the record on to the next handler. An optional string can be provided explaining the reason for passing on handling the error.- Parameters:
reason- optional reason for passing on data. Reasons are used in the final report if an error could not be handled.- Returns:
- Appropriate handler result value stating the failure should be passed on to the next handler. In
most cases this is
HandlerResult.PASSbut can vary depending on the use case.
-