@Internal public abstract class AbstractPythonStreamGroupAggregateOperator extends AbstractPythonStreamAggregateOperator implements Triggerable<RowData,VoidNamespace>, CleanupState
PythonStreamGroupAggregateOperator
and PythonStreamGroupTableAggregateOperator
.bais, baisWrapper, baos, baosWrapper, FLINK_AGGREGATE_FUNCTION_SCHEMA_CODER_URN, inputType, outputType, rowDataWrapper, userDefinedFunctionInputType, userDefinedFunctionOutputType
elementCount, maxBundleSize, pythonFunctionRunner
chainingStrategy, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
AbstractPythonStreamGroupAggregateOperator(Configuration config,
RowType inputType,
RowType outputType,
PythonAggregateFunctionInfo[] aggregateFunctions,
DataViewUtils.DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore,
long minRetentionTime,
long maxRetentionTime,
FlinkFnApi.CoderParam.OutputMode outputMode) |
Modifier and Type | Method and Description |
---|---|
void |
emitResult(Tuple2<byte[],Integer> resultTuple)
Sends the execution result to the downstream operator.
|
RowType |
getUserDefinedFunctionInputType() |
RowType |
getUserDefinedFunctionOutputType() |
protected FlinkFnApi.UserDefinedAggregateFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined aggregate functions to be executed.
|
void |
onEventTime(InternalTimer<RowData,VoidNamespace> timer)
Invoked when an event-time timer fires.
|
void |
onProcessingTime(InternalTimer<RowData,VoidNamespace> timer)
Invoked when a processing-time timer fires.
|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
void |
processElementInternal(RowData value) |
createPythonFunctionRunner, getCurrentKey, getFunctionUrn, getKeyType, getPythonEnv, processElement, setCurrentKey
endInput
checkInvokeFinishBundleByCount, close, createPythonEnvironmentManager, dispose, emitResults, getConfig, getFlinkMetricContainer, getPythonConfig, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setPythonConfig
getChainingStrategy, getContainingTask, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerProcessingCleanupTimer
setKeyContextElement
close, dispose, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
processLatencyMarker, processWatermark
public AbstractPythonStreamGroupAggregateOperator(Configuration config, RowType inputType, RowType outputType, PythonAggregateFunctionInfo[] aggregateFunctions, DataViewUtils.DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, long minRetentionTime, long maxRetentionTime, FlinkFnApi.CoderParam.OutputMode outputMode)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<RowData>
open
in class AbstractPythonStreamAggregateOperator
Exception
- An exception in this method causes the operator to fail.public void onEventTime(InternalTimer<RowData,VoidNamespace> timer)
onEventTime
in interface Triggerable<RowData,VoidNamespace>
public void onProcessingTime(InternalTimer<RowData,VoidNamespace> timer) throws Exception
onProcessingTime
in interface Triggerable<RowData,VoidNamespace>
Exception
public void processElementInternal(RowData value) throws Exception
processElementInternal
in class AbstractPythonStreamAggregateOperator
Exception
public void emitResult(Tuple2<byte[],Integer> resultTuple) throws Exception
AbstractPythonFunctionOperator
emitResult
in class AbstractPythonFunctionOperator<RowData>
Exception
public RowType getUserDefinedFunctionInputType()
getUserDefinedFunctionInputType
in class AbstractPythonStreamAggregateOperator
public RowType getUserDefinedFunctionOutputType()
getUserDefinedFunctionOutputType
in class AbstractPythonStreamAggregateOperator
protected FlinkFnApi.UserDefinedAggregateFunctions getUserDefinedFunctionsProto()
AbstractPythonStreamAggregateOperator
getUserDefinedFunctionsProto
in class AbstractPythonStreamAggregateOperator
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.