Class AbortOnFailure<I extends Exceptional,O,C extends ErrorCollector<O>>
java.lang.Object
org.elasticsearch.hadoop.handler.impl.AbortOnFailure<I,O,C>
- All Implemented Interfaces:
ErrorHandler<I,O, C>
public class AbortOnFailure<I extends Exceptional,O,C extends ErrorCollector<O>>
extends Object
implements ErrorHandler<I,O,C>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called at the close of the connector to clean up any internal resources.static <I extends Exceptional,O, C extends ErrorCollector<O>>
AbortOnFailure<I,O, C> create()voidinit(Properties properties) Called at the handler creation time to initialize any internal state or resources.Called when an exception or failure occurs in a part of the connector.
-
Constructor Details
-
AbortOnFailure
public AbortOnFailure()
-
-
Method Details
-
create
public static <I extends Exceptional,O, AbortOnFailure<I,C extends ErrorCollector<O>> O, create()C> -
init
Description copied from interface:ErrorHandlerCalled at the handler creation time to initialize any internal state or resources.- Specified by:
initin interfaceErrorHandler<I extends Exceptional,O, C extends ErrorCollector<O>> - Parameters:
properties- Properties for this handler with handler name prefix stripped away.
-
close
public void close()Description copied from interface:ErrorHandlerCalled at the close of the connector to clean up any internal resources.- Specified by:
closein interfaceErrorHandler<I extends Exceptional,O, C extends ErrorCollector<O>>
-
onError
Description copied from interface:ErrorHandlerCalled when an exception or failure occurs in a part of the connector.- Specified by:
onErrorin interfaceErrorHandler<I extends Exceptional,O, C extends ErrorCollector<O>> - Parameters:
entry- information about the failure, normally includes operational data and error informationcollector- handler for accepting user reactions to the failure, like retrying with modified parameters- Returns:
- An enum that describes the handler's result, either that it handled the error or if the error should be passed on to the next handler.
- Throws:
Exception- In the event that the current failure should not be handled, and should halt the connector processing.
-