java.lang.Object
org.elasticsearch.ingest.Pipeline
A pipeline is a list of
Processor instances grouped under a unique id.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPipeline(String id, String description, Integer version, Map<String, Object> metadata, CompoundProcessor compoundProcessor) Pipeline(String id, String description, Integer version, Map<String, Object> metadata, CompoundProcessor compoundProcessor, IngestPipelineFieldAccessPattern fieldAccessPattern, Boolean deprecated, Long createdDateMillis, Long modifiedDateMillis) -
Method Summary
Modifier and TypeMethodDescriptionstatic Pipelinecreate(String id, Map<String, Object> config, Map<String, Processor.Factory> processorFactories, ScriptService scriptService, ProjectId projectId) Deprecated.To be removed after Logstash has transitioned fully to the logstash-bridge library.static Pipelinecreate(String id, Map<String, Object> config, Map<String, Processor.Factory> processorFactories, ScriptService scriptService, ProjectId projectId, Predicate<NodeFeature> hasFeature) voidexecute(IngestDocument ingestDocument, BiConsumer<IngestDocument, Exception> handler) Modifies the data of a document to be indexed based on the processor this pipeline holds Ifnullis returned then this document will be dropped and not indexed, otherwise this document will be kept and indexed.Flattens the normal and on failure processors into a single list.Get the underlyingCompoundProcessorcontaining the Pipeline's processorsAn optional description of what this pipeline is doing to the data gets processed by this pipeline.The field access pattern that the pipeline will use to retrieve and set fields on documents.getId()The unique id of this pipelineThe metrics associated with this pipeline.Unmodifiable list containing each on_failure processor that operates on the data in case of exception thrown in pipeline processorsUnmodifiable list containing each processor that operates on the data.An optional version stored with the pipeline so that it can be used to determine if the pipeline should be updated / replaced.booleantoString()
-
Field Details
-
DESCRIPTION_KEY
- See Also:
-
PROCESSORS_KEY
- See Also:
-
VERSION_KEY
- See Also:
-
ON_FAILURE_KEY
- See Also:
-
META_KEY
- See Also:
-
FIELD_ACCESS_PATTERN
- See Also:
-
DEPRECATED_KEY
- See Also:
-
CREATED_DATE_MILLIS
- See Also:
-
CREATED_DATE
- See Also:
-
MODIFIED_DATE_MILLIS
- See Also:
-
MODIFIED_DATE
- See Also:
-
-
Constructor Details
-
Pipeline
-
Pipeline
public Pipeline(String id, @Nullable String description, @Nullable Integer version, @Nullable Map<String, Object> metadata, CompoundProcessor compoundProcessor, IngestPipelineFieldAccessPattern fieldAccessPattern, @Nullable Boolean deprecated, @Nullable Long createdDateMillis, @Nullable Long modifiedDateMillis)
-
-
Method Details
-
create
@Deprecated public static Pipeline create(String id, Map<String, Object> config, Map<String, throws ExceptionProcessor.Factory> processorFactories, ScriptService scriptService, ProjectId projectId) Deprecated.To be removed after Logstash has transitioned fully to the logstash-bridge library. Functionality will be relocated to there. Usecreate(String, Map, Map, ScriptService, ProjectId, Predicate)instead.- Throws:
Exception
-
create
public static Pipeline create(String id, Map<String, Object> config, Map<String, throws ExceptionProcessor.Factory> processorFactories, ScriptService scriptService, ProjectId projectId, Predicate<NodeFeature> hasFeature) - Throws:
Exception
-
execute
Modifies the data of a document to be indexed based on the processor this pipeline holds Ifnullis returned then this document will be dropped and not indexed, otherwise this document will be kept and indexed. -
getId
The unique id of this pipeline -
getDescription
An optional description of what this pipeline is doing to the data gets processed by this pipeline. -
getVersion
An optional version stored with the pipeline so that it can be used to determine if the pipeline should be updated / replaced.- Returns:
nullif not supplied.
-
getMetadata
-
getCompoundProcessor
Get the underlyingCompoundProcessorcontaining the Pipeline's processors -
getProcessors
Unmodifiable list containing each processor that operates on the data. -
getOnFailureProcessors
Unmodifiable list containing each on_failure processor that operates on the data in case of exception thrown in pipeline processors -
flattenAllProcessors
Flattens the normal and on failure processors into a single list. The original order is lost. This can be useful for pipeline validation purposes. -
getMetrics
The metrics associated with this pipeline. -
getFieldAccessPattern
The field access pattern that the pipeline will use to retrieve and set fields on documents. -
getDeprecated
-
isDeprecated
public boolean isDeprecated() -
getCreatedDateMillis
-
getModifiedDateMillis
-
toString
-