Module org.elasticsearch.compute
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
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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory, Operator.Status -
Field Summary
FieldsFields inherited from class org.elasticsearch.compute.operator.CompleteInputCollectorOperator
finished, inputPages, pagesReceived, rowsReceivedFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionChangePointOperator(DriverContext driverContext, int channel, WarningSourceLocation source) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the operator can produce more output pages without requiring additional input pages.protected booleanAdds any additional checks to ensure the subclass is finishedprotected voidonClose()Additional implementation for closing out the subclassprotected voidCalled when he base finish() call is completedprotected PageImplementation to retrieve the output pages.toString()Methods inherited from class org.elasticsearch.compute.operator.CompleteInputCollectorOperator
addInput, close, finish, getOutput, isFinished, needsInput
-
Field Details
-
INPUT_VALUE_COUNT_LIMIT
public static final int INPUT_VALUE_COUNT_LIMIT- See Also:
-
-
Constructor Details
-
ChangePointOperator
-
-
Method Details
-
canProduceMoreDataWithoutExtraInput
public boolean canProduceMoreDataWithoutExtraInput()Description copied from interface:OperatorReturns 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 returntrue:- Operators with internal buffers (e.g.,
AsyncOperatorwith pending results) - Operators processing a single input page into multiple output pages
- Aggregation operators that buffer partial results
- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
onFinished
protected void onFinished()Description copied from class:CompleteInputCollectorOperatorCalled when he base finish() call is completed- Specified by:
onFinishedin classCompleteInputCollectorOperator
-
isOperatorFinished
protected boolean isOperatorFinished()Description copied from class:CompleteInputCollectorOperatorAdds any additional checks to ensure the subclass is finished- Specified by:
isOperatorFinishedin classCompleteInputCollectorOperator- Returns:
- true if the subclass is finished
-
onGetOutput
Description copied from class:CompleteInputCollectorOperatorImplementation to retrieve the output pages. Will only run if `isFinished()` is true- Specified by:
onGetOutputin classCompleteInputCollectorOperator- Returns:
- the output page (or null if not ready or none)
-
onClose
protected void onClose()Description copied from class:CompleteInputCollectorOperatorAdditional implementation for closing out the subclass- Specified by:
onClosein classCompleteInputCollectorOperator
-
toString
-