Package org.elasticsearch.ingest
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.ingest.Processor
Processor.Factory, Processor.Parameters -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringON_FAILURE_MESSAGE_FIELDstatic java.lang.StringON_FAILURE_PIPELINE_FIELDstatic java.lang.StringON_FAILURE_PROCESSOR_TAG_FIELDstatic java.lang.StringON_FAILURE_PROCESSOR_TYPE_FIELD -
Constructor Summary
Constructors Constructor Description CompoundProcessor(boolean ignoreFailure, java.util.List<Processor> processors, java.util.List<Processor> onFailureProcessors)CompoundProcessor(Processor... processor) -
Method Summary
Modifier and Type Method Description IngestDocumentexecute(IngestDocument ingestDocument)Introspect and potentially modify the incoming data.voidexecute(IngestDocument ingestDocument, java.util.function.BiConsumer<IngestDocument,java.lang.Exception> handler)Introspect and potentially modify the incoming data.java.util.List<Processor>flattenProcessors()java.lang.StringgetDescription()Gets the description of a processor.java.util.List<Processor>getOnFailureProcessors()java.util.List<Processor>getProcessors()java.lang.StringgetTag()Gets the tag of a processor.java.lang.StringgetType()Gets the type of a processorbooleanisIgnoreFailure()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
CompoundProcessor
-
-
Method Details
-
isIgnoreFailure
public boolean isIgnoreFailure() -
getOnFailureProcessors
-
getProcessors
-
flattenProcessors
-
getType
public java.lang.String getType()Description copied from interface:ProcessorGets the type of a processor -
getTag
public java.lang.String getTag()Description copied from interface:ProcessorGets the tag of a processor. -
getDescription
public java.lang.String getDescription()Description copied from interface:ProcessorGets the description of a processor.- Specified by:
getDescriptionin interfaceProcessor
-
execute
Description copied from interface:ProcessorIntrospect and potentially modify the incoming data. -
execute
public void execute(IngestDocument ingestDocument, java.util.function.BiConsumer<IngestDocument,java.lang.Exception> handler)Description copied from interface:ProcessorIntrospect and potentially modify the incoming data. Expert method: only override this method if a processor implementation needs to make an asynchronous call, otherwise just overwriteProcessor.execute(IngestDocument).
-