java.lang.Object
org.elasticsearch.ingest.SamplingService
- All Implemented Interfaces:
ClusterStateListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidCalled when cluster state changes.voidmaybeSample(ProjectMetadata projectMetadata, String indexName, Supplier<IndexRequest> indexRequestSupplier, IngestDocument ingestDocument) voidmaybeSample(ProjectMetadata projectMetadata, IndexRequest indexRequest) Potentially samples the given indexRequest, depending on the existing sampling configuration.
-
Constructor Details
-
SamplingService
-
-
Method Details
-
maybeSample
Potentially samples the given indexRequest, depending on the existing sampling configuration.- Parameters:
projectMetadata- Used to get the sampling configurationindexRequest- The raw request to potentially sample
-
maybeSample
public void maybeSample(ProjectMetadata projectMetadata, String indexName, Supplier<IndexRequest> indexRequestSupplier, IngestDocument ingestDocument) - Parameters:
projectMetadata- Used to get the sampling configurationindexRequestSupplier- A supplier for the raw request to potentially sampleingestDocument- The IngestDocument used for evaluating any conditionals that are part of the sample configuration
-
atLeastOneSampleConfigured
public boolean atLeastOneSampleConfigured() -
clusterChanged
Description copied from interface:ClusterStateListenerCalled when cluster state changes.Cluster states are applied one-by-one which means they can be a performance bottleneck. Implementations of this method should therefore be fast, so please consider forking work into the background rather than doing everything inline.
- Specified by:
clusterChangedin interfaceClusterStateListener
-