@Internal public class PythonStreamGroupWindowAggregateOperator<K,W extends Window> extends AbstractPythonStreamAggregateOperator implements Triggerable<K,W>
bais, baisWrapper, baos, baosWrapper, inputType, outputType, rowDataWrapper, userDefinedFunctionInputType, userDefinedFunctionOutputType
pythonFunctionRunner
bundleFinishedCallback, config, elementCount, lastFinishBundleTime, maxBundleSize, systemEnvEnabled
chainingStrategy, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Modifier | Constructor and Description |
---|---|
protected |
PythonStreamGroupWindowAggregateOperator(Configuration config,
RowType inputType,
RowType outputType,
PythonAggregateFunctionInfo[] aggregateFunctions,
DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore,
boolean countStarInserted,
int inputTimeFieldIndex,
GroupWindowAssigner<W> windowAssigner,
FlinkFnApi.GroupWindow.WindowType windowType,
boolean isRowTime,
boolean isTimeWindow,
long size,
long slide,
long gap,
long allowedLateness,
NamedWindowProperty[] namedProperties,
ZoneId shiftTimeZone) |
Modifier and Type | Method and Description |
---|---|
FlinkFnApi.CoderInfoDescriptor |
createInputCoderInfoDescriptor(RowType runnerInputType) |
FlinkFnApi.CoderInfoDescriptor |
createOutputCoderInfoDescriptor(RowType runnerOutType) |
static <K,W extends Window> |
createSessionGroupWindowAggregateOperator(Configuration config,
RowType inputType,
RowType outputType,
PythonAggregateFunctionInfo[] aggregateFunctions,
DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore,
boolean countStarInserted,
int inputTimeFieldIndex,
GroupWindowAssigner<W> windowAssigner,
boolean isRowTime,
long gap,
long allowedLateness,
NamedWindowProperty[] namedProperties,
ZoneId shiftTimeZone) |
static <K,W extends Window> |
createSlidingGroupWindowAggregateOperator(Configuration config,
RowType inputType,
RowType outputType,
PythonAggregateFunctionInfo[] aggregateFunctions,
DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore,
boolean countStarInserted,
int inputTimeFieldIndex,
GroupWindowAssigner<W> windowAssigner,
boolean isRowTime,
boolean isTimeWindow,
long size,
long slide,
long allowedLateness,
NamedWindowProperty[] namedProperties,
ZoneId shiftTimeZone) |
static <K,W extends Window> |
createTumblingGroupWindowAggregateOperator(Configuration config,
RowType inputType,
RowType outputType,
PythonAggregateFunctionInfo[] aggregateFunctions,
DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore,
boolean countStarInserted,
int inputTimeFieldIndex,
GroupWindowAssigner<W> windowAssigner,
boolean isRowTime,
boolean isTimeWindow,
long size,
long allowedLateness,
NamedWindowProperty[] namedProperties,
ZoneId shiftTimeZone) |
RowType |
createUserDefinedFunctionInputType() |
RowType |
createUserDefinedFunctionOutputType() |
void |
emitResult(Tuple3<String,byte[],Integer> resultTuple)
Sends the execution result to the downstream operator.
|
String |
getFunctionUrn() |
protected FlinkFnApi.UserDefinedAggregateFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined aggregate functions to be executed.
|
TypeSerializer<W> |
getWindowSerializer() |
void |
onEventTime(InternalTimer<K,W> timer)
Invoked when an event-time timer fires.
|
void |
onProcessingTime(InternalTimer<K,W> 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. state initialization.
|
void |
processElementInternal(RowData value) |
createPythonFunctionRunner, getCurrentKey, getKeyType, getPythonEnv, processElement, setCurrentKey
endInput
close, createPythonEnvironmentManager, emitResults, invokeFinishBundle
checkInvokeFinishBundleByCount, finish, getConfiguration, getFlinkMetricContainer, isBundleFinished, prepareSnapshotPreBarrier, processWatermark
getChainingStrategy, getContainingTask, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
hasKeyContext
protected PythonStreamGroupWindowAggregateOperator(Configuration config, RowType inputType, RowType outputType, PythonAggregateFunctionInfo[] aggregateFunctions, DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, GroupWindowAssigner<W> windowAssigner, FlinkFnApi.GroupWindow.WindowType windowType, boolean isRowTime, boolean isTimeWindow, long size, long slide, long gap, long allowedLateness, NamedWindowProperty[] namedProperties, ZoneId shiftTimeZone)
public static <K,W extends Window> PythonStreamGroupWindowAggregateOperator<K,W> createTumblingGroupWindowAggregateOperator(Configuration config, RowType inputType, RowType outputType, PythonAggregateFunctionInfo[] aggregateFunctions, DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, GroupWindowAssigner<W> windowAssigner, boolean isRowTime, boolean isTimeWindow, long size, long allowedLateness, NamedWindowProperty[] namedProperties, ZoneId shiftTimeZone)
public static <K,W extends Window> PythonStreamGroupWindowAggregateOperator<K,W> createSlidingGroupWindowAggregateOperator(Configuration config, RowType inputType, RowType outputType, PythonAggregateFunctionInfo[] aggregateFunctions, DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, GroupWindowAssigner<W> windowAssigner, boolean isRowTime, boolean isTimeWindow, long size, long slide, long allowedLateness, NamedWindowProperty[] namedProperties, ZoneId shiftTimeZone)
public static <K,W extends Window> PythonStreamGroupWindowAggregateOperator<K,W> createSessionGroupWindowAggregateOperator(Configuration config, RowType inputType, RowType outputType, PythonAggregateFunctionInfo[] aggregateFunctions, DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, GroupWindowAssigner<W> windowAssigner, boolean isRowTime, long gap, long allowedLateness, NamedWindowProperty[] namedProperties, ZoneId shiftTimeZone)
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 processElementInternal(RowData value) throws Exception
processElementInternal
in class AbstractPythonStreamAggregateOperator
Exception
public void emitResult(Tuple3<String,byte[],Integer> resultTuple) throws Exception
AbstractExternalPythonFunctionOperator
emitResult
in class AbstractExternalPythonFunctionOperator<RowData>
Exception
public String getFunctionUrn()
getFunctionUrn
in class AbstractPythonStreamAggregateOperator
public RowType createUserDefinedFunctionInputType()
createUserDefinedFunctionInputType
in class AbstractPythonStreamAggregateOperator
public RowType createUserDefinedFunctionOutputType()
createUserDefinedFunctionOutputType
in class AbstractPythonStreamAggregateOperator
protected FlinkFnApi.UserDefinedAggregateFunctions getUserDefinedFunctionsProto()
AbstractPythonStreamAggregateOperator
getUserDefinedFunctionsProto
in class AbstractPythonStreamAggregateOperator
public TypeSerializer<W> getWindowSerializer()
public void onEventTime(InternalTimer<K,W> timer) throws Exception
Triggerable
onEventTime
in interface Triggerable<K,W extends Window>
Exception
public void onProcessingTime(InternalTimer<K,W> timer) throws Exception
Triggerable
onProcessingTime
in interface Triggerable<K,W extends Window>
Exception
public FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor(RowType runnerInputType)
createInputCoderInfoDescriptor
in class AbstractPythonStreamAggregateOperator
public FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor(RowType runnerOutType)
createOutputCoderInfoDescriptor
in class AbstractPythonStreamAggregateOperator
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.