Class CompoundProcessor

java.lang.Object
org.elasticsearch.ingest.CompoundProcessor
All Implemented Interfaces:
Processor

public class CompoundProcessor
extends java.lang.Object
implements Processor
A Processor that executes a list of other "processors". It executes a separate list of "onFailureProcessors" when any of the processors throw an Exception.
  • Field Details

    • ON_FAILURE_MESSAGE_FIELD

      public static final java.lang.String ON_FAILURE_MESSAGE_FIELD
      See Also:
      Constant Field Values
    • ON_FAILURE_PROCESSOR_TYPE_FIELD

      public static final java.lang.String ON_FAILURE_PROCESSOR_TYPE_FIELD
      See Also:
      Constant Field Values
    • ON_FAILURE_PROCESSOR_TAG_FIELD

      public static final java.lang.String ON_FAILURE_PROCESSOR_TAG_FIELD
      See Also:
      Constant Field Values
    • ON_FAILURE_PIPELINE_FIELD

      public static final java.lang.String ON_FAILURE_PIPELINE_FIELD
      See Also:
      Constant Field Values
  • Constructor Details

    • CompoundProcessor

      public CompoundProcessor​(Processor... processor)
    • CompoundProcessor

      public CompoundProcessor​(boolean ignoreFailure, java.util.List<Processor> processors, java.util.List<Processor> onFailureProcessors)
  • Method Details

    • isIgnoreFailure

      public boolean isIgnoreFailure()
    • getOnFailureProcessors

      public java.util.List<Processor> getOnFailureProcessors()
    • getProcessors

      public java.util.List<Processor> getProcessors()
    • flattenProcessors

      public java.util.List<Processor> flattenProcessors()
    • getType

      public java.lang.String getType()
      Description copied from interface: Processor
      Gets the type of a processor
      Specified by:
      getType in interface Processor
    • getTag

      public java.lang.String getTag()
      Description copied from interface: Processor
      Gets the tag of a processor.
      Specified by:
      getTag in interface Processor
    • getDescription

      public java.lang.String getDescription()
      Description copied from interface: Processor
      Gets the description of a processor.
      Specified by:
      getDescription in interface Processor
    • execute

      public IngestDocument execute​(IngestDocument ingestDocument) throws java.lang.Exception
      Description copied from interface: Processor
      Introspect and potentially modify the incoming data.
      Specified by:
      execute in interface Processor
      Returns:
      If null is returned then the current document will be dropped and not be indexed, otherwise this document will be kept and indexed
      Throws:
      java.lang.Exception
    • execute

      public void execute​(IngestDocument ingestDocument, java.util.function.BiConsumer<IngestDocument,​java.lang.Exception> handler)
      Description copied from interface: Processor
      Introspect and potentially modify the incoming data. Expert method: only override this method if a processor implementation needs to make an asynchronous call, otherwise just overwrite Processor.execute(IngestDocument).
      Specified by:
      execute in interface Processor