Class DropAndLog<I extends Exceptional,O,C extends ErrorCollector<O>>

java.lang.Object
org.elasticsearch.hadoop.handler.impl.DropAndLog<I,O,C>
All Implemented Interfaces:
ErrorHandler<I,O,C>

public class DropAndLog<I extends Exceptional,O,C extends ErrorCollector<O>> extends Object implements ErrorHandler<I,O,C>
  • Field Details

  • Constructor Details

    • DropAndLog

      public DropAndLog(LogRenderer<I> logLineMaker)
  • Method Details

    • create

      public static <I extends Exceptional, O, C extends ErrorCollector<O>> DropAndLog<I,O,C> create(LogRenderer<I> logLineMaker)
    • init

      public void init(Properties properties)
      Description copied from interface: ErrorHandler
      Called at the handler creation time to initialize any internal state or resources.
      Specified by:
      init in interface ErrorHandler<I extends Exceptional,O,C extends ErrorCollector<O>>
      Parameters:
      properties - Properties for this handler with handler name prefix stripped away.
    • onError

      public HandlerResult onError(I entry, C collector) throws Exception
      Description copied from interface: ErrorHandler
      Called when an exception or failure occurs in a part of the connector.
      Specified by:
      onError in interface ErrorHandler<I extends Exceptional,O,C extends ErrorCollector<O>>
      Parameters:
      entry - information about the failure, normally includes operational data and error information
      collector - 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.
    • close

      public void close()
      Description copied from interface: ErrorHandler
      Called at the close of the connector to clean up any internal resources.
      Specified by:
      close in interface ErrorHandler<I extends Exceptional,O,C extends ErrorCollector<O>>