Class TestProcessor

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

public class TestProcessor extends Object implements org.elasticsearch.ingest.Processor
Processor used for testing, keeps track of how many times it is invoked and accepts a Consumer of IngestDocument to be called when executed.
  • Constructor Details

    • TestProcessor

      public TestProcessor(Consumer<org.elasticsearch.ingest.IngestDocument> ingestDocumentConsumer)
    • TestProcessor

      public TestProcessor(RuntimeException e)
    • TestProcessor

      public TestProcessor(String tag, String type, String description, RuntimeException e)
    • TestProcessor

      public TestProcessor(String tag, String type, String description, Consumer<org.elasticsearch.ingest.IngestDocument> ingestDocumentConsumer)
    • TestProcessor

      public TestProcessor(String tag, String type, String description, Function<org.elasticsearch.ingest.IngestDocument,​org.elasticsearch.ingest.IngestDocument> ingestDocumentMapper)
  • Method Details

    • execute

      public org.elasticsearch.ingest.IngestDocument execute(org.elasticsearch.ingest.IngestDocument ingestDocument) throws Exception
      Specified by:
      execute in interface org.elasticsearch.ingest.Processor
      Throws:
      Exception
    • getType

      public String getType()
      Specified by:
      getType in interface org.elasticsearch.ingest.Processor
    • getTag

      public String getTag()
      Specified by:
      getTag in interface org.elasticsearch.ingest.Processor
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.elasticsearch.ingest.Processor
    • getInvokedCounter

      public int getInvokedCounter()