Module org.elasticsearch.compute
Class ChangePointOperator
java.lang.Object
org.elasticsearch.compute.operator.ChangePointOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,Releasable
Find spikes, dips and change points in a list of values.
In grouped mode the operator streams output per group: as soon as a group boundary is detected in the grouped input, the completed group is flushed through the change-point detector, annotated, and queued for output.
In non-grouped mode all input is buffered until finish() because
the single implicit group cannot complete earlier.
Warning: even in grouped mode the operator cannot handle large groups! It buffers all data for the current group, runs the change point detector (which is a compute-heavy process), and then outputs the annotated data.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory, Operator.Status -
Field Summary
FieldsFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionChangePointOperator(DriverContext driverContext, int channel, int[] groupingChannels, WarningSourceLocation source) -
Method Summary
Modifier and TypeMethodDescriptionvoidadds an input page to the operator.booleanReturns true if the operator can produce more output pages without requiring additional input pages.voidclose()notifies the operator that it won't be used anymore (i.e.voidfinish()notifies the operator that it won't receive any more input pagesreturns non-null if output page available.booleanwhether the operator has finished processing all input pages and made the corresponding output pages availablebooleanwhether the given operator can accept more input pagestoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
isBlocked, status, tryPromote
-
Field Details
-
INPUT_VALUE_COUNT_LIMIT
public static final int INPUT_VALUE_COUNT_LIMIT- See Also:
-
-
Constructor Details
-
ChangePointOperator
public ChangePointOperator(DriverContext driverContext, int channel, int[] groupingChannels, WarningSourceLocation source)
-
-
Method Details
-
needsInput
public boolean needsInput()Description copied from interface:Operatorwhether the given operator can accept more input pages- Specified by:
needsInputin interfaceOperator
-
addInput
Description copied from interface:Operatoradds an input page to the operator. only called when needsInput() == true and isFinished() == false -
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
isFinished
public boolean isFinished()Description copied from interface:Operatorwhether the operator has finished processing all input pages and made the corresponding output pages available- Specified by:
isFinishedin interfaceOperator
-
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
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
- Specified by:
canProduceMoreDataWithoutExtraInputin interfaceOperator- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceReleasable
-
toString
-