Package org.elasticsearch.ingest
Class IngestPipelineTestUtils
java.lang.Object
org.elasticsearch.ingest.IngestPipelineTestUtils
Utils for creating/retrieving/deleting ingest pipelines in a test cluster.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeletePipelinesIgnoringExceptions(ElasticsearchClient client, Iterable<String> ids) Attempt to delete the ingest pipeline with the givenid, using the givenElasticsearchClient, and logging (but otherwise ignoring) the result.static SimulatePipelineRequestjsonSimulatePipelineRequest(String jsonString) Construct a newSimulatePipelineRequestwhose content is the given JSON document, represented as aString.static SimulatePipelineRequestjsonSimulatePipelineRequest(BytesReference jsonBytes) Construct a newSimulatePipelineRequestwhose content is the given JSON document, represented as aBytesReference.static voidputJsonPipeline(ElasticsearchClient client, String id, String jsonString) Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.static voidputJsonPipeline(ElasticsearchClient client, String id, BytesReference source) Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.static voidputJsonPipeline(ElasticsearchClient client, String id, org.elasticsearch.xcontent.ToXContentFragment toXContent) Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.static PutPipelineRequestputJsonPipelineRequest(String id, String jsonString) static PutPipelineRequestputJsonPipelineRequest(String id, BytesReference source)
-
Method Details
-
putJsonPipelineRequest
- Parameters:
id- The pipeline id.source- The body of thePutPipelineRequestas a JSON-formattedBytesReference.- Returns:
- a new
PutPipelineRequestwith the givenidand body.
-
putJsonPipelineRequest
- Parameters:
id- The pipeline id.jsonString- The body of thePutPipelineRequestas a JSON-formattedString.- Returns:
- a new
PutPipelineRequestwith the givenidand body.
-
putJsonPipeline
Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.- Parameters:
client- The client to use to execute thePutPipelineTransportAction.id- The pipeline id.source- The body of thePutPipelineRequestas a JSON-formattedBytesReference.
-
putJsonPipeline
Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.- Parameters:
client- The client to use to execute thePutPipelineTransportAction.id- The pipeline id.jsonString- The body of thePutPipelineRequestas a JSON-formattedString.
-
putJsonPipeline
public static void putJsonPipeline(ElasticsearchClient client, String id, org.elasticsearch.xcontent.ToXContentFragment toXContent) throws IOException Create an ingest pipeline with the given ID and body, using the givenElasticsearchClient.- Parameters:
client- The client to use to execute thePutPipelineTransportAction.id- The pipeline id.toXContent- The body of thePutPipelineRequestas aToXContentFragment.- Throws:
IOException
-
deletePipelinesIgnoringExceptions
public static void deletePipelinesIgnoringExceptions(ElasticsearchClient client, Iterable<String> ids) Attempt to delete the ingest pipeline with the givenid, using the givenElasticsearchClient, and logging (but otherwise ignoring) the result. -
jsonSimulatePipelineRequest
Construct a newSimulatePipelineRequestwhose content is the given JSON document, represented as aString. -
jsonSimulatePipelineRequest
Construct a newSimulatePipelineRequestwhose content is the given JSON document, represented as aBytesReference.
-