Class AbstractProcessor

java.lang.Object
org.elasticsearch.ingest.AbstractProcessor
All Implemented Interfaces:
Processor
Direct Known Subclasses:
ConditionalProcessor, DropProcessor, PipelineProcessor

public abstract class AbstractProcessor extends Object implements Processor
An Abstract Processor that holds tag and description information about the processor.
  • Field Details

    • tag

      protected final String tag
    • description

      protected final String description
  • Constructor Details

    • AbstractProcessor

      protected AbstractProcessor(String tag, String description)
  • Method Details

    • getTag

      public String getTag()
      Description copied from interface: Processor
      Gets the tag of a processor.
      Specified by:
      getTag in interface Processor
    • getDescription

      public String getDescription()
      Description copied from interface: Processor
      Gets the description of a processor.
      Specified by:
      getDescription in interface Processor
    • logAndBuildException

      protected ElasticsearchException logAndBuildException(String message, Throwable throwable)
      Helper method to be used by processors that need to catch and log Throwables.

      If trace logging is enabled, then we log the provided message and the full stacktrace On the other hand if trace logging isn't enabled, then we log the provided message and the message from the Throwable (but not a stacktrace).

      Regardless of the logging level, we throw an ElasticsearchException that has the context in its message

      Parameters:
      message - A message to be logged and to be included in the message of the returned ElasticsearchException
      throwable - The Throwable that has been caught
      Returns:
      A new ElasticsearchException whose message includes the passed-in message and the message from the passed-in Throwable. It will not however wrap the given Throwable.