@Internal public abstract class AbstractPythonStreamAggregateOperator extends AbstractOneInputPythonFunctionOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
AbstractPythonStreamGroupAggregateOperator and PythonStreamGroupWindowAggregateOperator.| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.core.memory.ByteArrayInputStreamWithPos |
bais
Reusable InputStream used to holding the execution results to be deserialized.
|
protected org.apache.flink.core.memory.DataInputViewStreamWrapper |
baisWrapper
InputStream Wrapper.
|
protected org.apache.flink.core.memory.ByteArrayOutputStreamWithPos |
baos
Reusable OutputStream used to holding the serialized input elements.
|
protected org.apache.flink.core.memory.DataOutputViewStreamWrapper |
baosWrapper
OutputStream Wrapper.
|
protected org.apache.flink.table.types.logical.RowType |
inputType
The input logical type.
|
protected org.apache.flink.table.types.logical.RowType |
outputType
The output logical type.
|
protected StreamRecordRowDataWrappingCollector |
rowDataWrapper
The collector used to collect records.
|
protected org.apache.flink.table.types.logical.RowType |
userDefinedFunctionInputType
The user-defined function input logical type.
|
protected org.apache.flink.table.types.logical.RowType |
userDefinedFunctionOutputType
The user-defined function output logical type.
|
config, elementCount, jobOptions, maxBundleSize, pythonConfig, pythonFunctionRunner| 构造器和说明 |
|---|
AbstractPythonStreamAggregateOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType outputType,
org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
org.apache.flink.table.planner.typeutils.DataViewUtils.DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore) |
| 限定符和类型 | 方法和说明 |
|---|---|
FlinkFnApi.CoderInfoDescriptor |
createInputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerInputType) |
FlinkFnApi.CoderInfoDescriptor |
createOutputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerOutType) |
PythonFunctionRunner |
createPythonFunctionRunner()
Creates the
PythonFunctionRunner which is responsible for Python user-defined
function execution. |
abstract org.apache.flink.table.types.logical.RowType |
createUserDefinedFunctionInputType() |
abstract org.apache.flink.table.types.logical.RowType |
createUserDefinedFunctionOutputType() |
Object |
getCurrentKey() |
abstract String |
getFunctionUrn() |
protected org.apache.flink.table.types.logical.RowType |
getKeyType() |
org.apache.flink.table.functions.python.PythonEnv |
getPythonEnv()
Returns the
PythonEnv used to create PythonEnvironmentManager.. |
protected FlinkFnApi.UserDefinedAggregateFunctions |
getUserDefinedFunctionsProto()
Gets the proto representation of the Python user-defined aggregate functions to be executed.
|
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) |
abstract void |
processElementInternal(org.apache.flink.table.data.RowData value) |
void |
setCurrentKey(Object key)
As the beam state gRPC service will access the KeyedStateBackend in parallel with this
operator, we must override this method to prevent changing the current key of the
KeyedStateBackend while the beam service is handling requests.
|
endInputcheckInvokeFinishBundleByCount, close, createPythonEnvironmentManager, emitResult, emitResults, finish, getConfiguration, getFlinkMetricContainer, invokeFinishBundle, isBundleFinished, prepareSnapshotPreBarrier, processWatermark, setConfigurationgetChainingStrategy, 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, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotStateprotected final org.apache.flink.table.types.logical.RowType inputType
protected final org.apache.flink.table.types.logical.RowType outputType
protected transient org.apache.flink.table.types.logical.RowType userDefinedFunctionInputType
protected transient org.apache.flink.table.types.logical.RowType userDefinedFunctionOutputType
protected transient org.apache.flink.core.memory.ByteArrayInputStreamWithPos bais
protected transient org.apache.flink.core.memory.DataInputViewStreamWrapper baisWrapper
protected transient org.apache.flink.core.memory.ByteArrayOutputStreamWithPos baos
protected transient org.apache.flink.core.memory.DataOutputViewStreamWrapper baosWrapper
protected transient StreamRecordRowDataWrappingCollector rowDataWrapper
public AbstractPythonStreamAggregateOperator(org.apache.flink.configuration.Configuration config,
org.apache.flink.table.types.logical.RowType inputType,
org.apache.flink.table.types.logical.RowType outputType,
org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
org.apache.flink.table.planner.typeutils.DataViewUtils.DataViewSpec[][] dataViewSpecs,
int[] grouping,
int indexOfCountStar,
boolean generateUpdateBefore)
public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>open 在类中 AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element)
throws Exception
Exceptionpublic PythonFunctionRunner createPythonFunctionRunner() throws Exception
AbstractPythonFunctionOperatorPythonFunctionRunner which is responsible for Python user-defined
function execution.createPythonFunctionRunner 在类中 AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>Exceptionpublic void setCurrentKey(Object key)
setCurrentKey 在接口中 org.apache.flink.streaming.api.operators.KeyContextsetCurrentKey 在类中 AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>public Object getCurrentKey()
getCurrentKey 在接口中 org.apache.flink.streaming.api.operators.KeyContextgetCurrentKey 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>public org.apache.flink.table.functions.python.PythonEnv getPythonEnv()
AbstractPythonFunctionOperatorPythonEnv used to create PythonEnvironmentManager..getPythonEnv 在类中 AbstractPythonFunctionOperator<org.apache.flink.table.data.RowData>protected org.apache.flink.table.types.logical.RowType getKeyType()
protected FlinkFnApi.UserDefinedAggregateFunctions getUserDefinedFunctionsProto()
public abstract String getFunctionUrn()
public abstract void processElementInternal(org.apache.flink.table.data.RowData value)
throws Exception
Exceptionpublic abstract org.apache.flink.table.types.logical.RowType createUserDefinedFunctionInputType()
public abstract org.apache.flink.table.types.logical.RowType createUserDefinedFunctionOutputType()
public FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerInputType)
public FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor(org.apache.flink.table.types.logical.RowType runnerOutType)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.