public class GroupAggFunction extends KeyedProcessFunctionWithCleanupState<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
stateCleaningEnabled| 构造器和说明 |
|---|
GroupAggFunction(long minRetentionTime,
long maxRetentionTime,
GeneratedAggsHandleFunction genAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
org.apache.flink.table.types.logical.LogicalType[] accTypes,
int indexOfCountStar,
boolean generateUpdateBefore)
Creates a
GroupAggFunction. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
onTimer(long timestamp,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
processElement(org.apache.flink.table.data.RowData input,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) |
cleanupState, initCleanupTimeState, isProcessingTimeTimer, needToCleanupState, registerProcessingCleanupTimergetIterationRuntimeContext, getRuntimeContext, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterProcessingCleanupTimerpublic GroupAggFunction(long minRetentionTime,
long maxRetentionTime,
GeneratedAggsHandleFunction genAggsHandler,
GeneratedRecordEqualiser genRecordEqualiser,
org.apache.flink.table.types.logical.LogicalType[] accTypes,
int indexOfCountStar,
boolean generateUpdateBefore)
GroupAggFunction.minRetentionTime - minimal state idle retention time.maxRetentionTime - maximal state idle retention time.genAggsHandler - The code generated function used to handle aggregates.genRecordEqualiser - The code generated equaliser used to equal RowData.accTypes - The accumulator types.indexOfCountStar - The index of COUNT(*) in the aggregates.
-1 when the input doesn't contain COUNT(*), i.e. doesn't contain retraction messages.
We make sure there is a COUNT(*) if input stream contains retraction.generateUpdateBefore - Whether this operator will generate UPDATE_BEFORE messages.public void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
open 在接口中 org.apache.flink.api.common.functions.RichFunctionopen 在类中 org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void processElement(org.apache.flink.table.data.RowData input,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
throws Exception
processElement 在类中 org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>Exceptionpublic void onTimer(long timestamp,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx,
org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
throws Exception
onTimer 在类中 org.apache.flink.streaming.api.functions.KeyedProcessFunction<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.