Class ChangePointOperator

java.lang.Object
org.elasticsearch.compute.operator.CompleteInputCollectorOperator
org.elasticsearch.compute.operator.ChangePointOperator
All Implemented Interfaces:
Closeable, AutoCloseable, Operator, org.elasticsearch.core.Releasable

public class ChangePointOperator extends CompleteInputCollectorOperator
Find spikes, dips and change point in a list of values.

Warning: this operator cannot handle large amounts of data! It buffers all data that is passed to it, runs the change point detector on the data (which is a compute-heavy process), and then outputs all data with the change points.

  • Field Details

    • INPUT_VALUE_COUNT_LIMIT

      public static final int INPUT_VALUE_COUNT_LIMIT
      See Also:
  • Constructor Details

  • Method Details

    • canProduceMoreDataWithoutExtraInput

      public boolean canProduceMoreDataWithoutExtraInput()
      Description copied from interface: Operator
      Returns true if the operator can produce more output pages without requiring additional input pages. This is useful for operators that buffer data or have internal state that can produce multiple output pages.

      Operators that do not buffer data should return false - they cannot produce pages out of thin air. Examples of operators that may return true:

      • Operators with internal buffers (e.g., AsyncOperator with pending results)
      • Operators processing a single input page into multiple output pages
      • Aggregation operators that buffer partial results
      Returns:
      true if the operator has buffered data that can produce output, false otherwise
    • onFinished

      protected void onFinished()
      Description copied from class: CompleteInputCollectorOperator
      Called when he base finish() call is completed
      Specified by:
      onFinished in class CompleteInputCollectorOperator
    • isOperatorFinished

      protected boolean isOperatorFinished()
      Description copied from class: CompleteInputCollectorOperator
      Adds any additional checks to ensure the subclass is finished
      Specified by:
      isOperatorFinished in class CompleteInputCollectorOperator
      Returns:
      true if the subclass is finished
    • onGetOutput

      protected Page onGetOutput()
      Description copied from class: CompleteInputCollectorOperator
      Implementation to retrieve the output pages. Will only run if `isFinished()` is true
      Specified by:
      onGetOutput in class CompleteInputCollectorOperator
      Returns:
      the output page (or null if not ready or none)
    • onClose

      protected void onClose()
      Description copied from class: CompleteInputCollectorOperator
      Additional implementation for closing out the subclass
      Specified by:
      onClose in class CompleteInputCollectorOperator
    • toString

      public String toString()
      Overrides:
      toString in class Object