Interface KeyContextHandler
-
- All Known Implementing Classes:
AbstractArrowPythonAggregateFunctionOperator
,AbstractAsyncStateStreamingJoinOperator
,AbstractAsyncStateStreamOperator
,AbstractAsyncStateUdfStreamOperator
,AbstractEmbeddedDataStreamPythonFunctionOperator
,AbstractEmbeddedPythonFunctionOperator
,AbstractEmbeddedStatelessFunctionOperator
,AbstractExternalDataStreamPythonFunctionOperator
,AbstractExternalOneInputPythonFunctionOperator
,AbstractExternalPythonFunctionOperator
,AbstractExternalTwoInputPythonFunctionOperator
,AbstractInput
,AbstractMapBundleOperator
,AbstractOneInputEmbeddedPythonFunctionOperator
,AbstractOneInputPythonFunctionOperator
,AbstractPythonFunctionOperator
,AbstractPythonScalarFunctionOperator
,AbstractPythonStreamAggregateOperator
,AbstractPythonStreamGroupAggregateOperator
,AbstractStatelessFunctionOperator
,AbstractStreamArrowPythonBoundedRangeOperator
,AbstractStreamArrowPythonBoundedRowsOperator
,AbstractStreamArrowPythonOverWindowAggregateFunctionOperator
,AbstractStreamingJoinOperator
,AbstractStreamingWriter
,AbstractStreamOperator
,AbstractTwoInputEmbeddedPythonFunctionOperator
,AbstractUdfStreamOperator
,AggregateWindowOperator
,AlignedWindowTableFunctionOperator
,ArrowPythonScalarFunctionOperator
,AsyncStateStreamingJoinOperator
,AsyncWaitOperator
,BaseTwoInputStreamOperatorWithStateRetention
,BatchArrowPythonGroupAggregateFunctionOperator
,BatchArrowPythonGroupWindowAggregateFunctionOperator
,BatchArrowPythonOverWindowAggregateFunctionOperator
,BatchCoBroadcastWithKeyedOperator
,BatchCoBroadcastWithNonKeyedOperator
,BatchCompactCoordinator
,BatchCompactOperator
,BatchFileWriter
,BatchGroupedReduceOperator
,BootstrapStreamTaskRunner
,BroadcastStateBootstrapOperator
,BufferDataOverWindowOperator
,CacheTransformationTranslator.IdentityStreamOperator
,CacheTransformationTranslator.NoOpStreamOperator
,CepOperator
,CoBroadcastWithKeyedOperator
,CoBroadcastWithNonKeyedOperator
,CollectSinkOperator
,CompactCoordinator
,CompactCoordinator
,CompactCoordinatorStateHandler
,CompactFileWriter
,CompactOperator
,CompactorOperator
,CompactorOperatorStateHandler
,ConstraintEnforcer
,ContinuousFileReaderOperator
,CoProcessOperator
,CoStreamFlatMap
,CoStreamMap
,DelegateOperatorTransformation.DelegateOperator
,DynamicFilteringDataCollectorOperator
,EmbeddedPythonBatchCoBroadcastProcessOperator
,EmbeddedPythonBatchKeyedCoBroadcastProcessOperator
,EmbeddedPythonCoProcessOperator
,EmbeddedPythonKeyedCoProcessOperator
,EmbeddedPythonKeyedProcessOperator
,EmbeddedPythonProcessOperator
,EmbeddedPythonScalarFunctionOperator
,EmbeddedPythonTableFunctionOperator
,EmbeddedPythonWindowOperator
,EvictingWindowOperator
,ExternalPythonBatchCoBroadcastProcessOperator
,ExternalPythonBatchKeyedCoBroadcastProcessOperator
,ExternalPythonCoProcessOperator
,ExternalPythonKeyedCoProcessOperator
,ExternalPythonKeyedProcessOperator
,ExternalPythonProcessOperator
,FirstInputOfTwoInput
,GenericWriteAheadSink
,GlobalRuntimeFilterBuilderOperator
,GroupReduceOperator
,HashJoinOperator
,HiveScriptTransformOperator
,InputBase
,InputConversionOperator
,IntervalJoinOperator
,KeyedCoProcessOperator
,KeyedCoProcessOperatorWithWatermarkDelay
,KeyedMapBundleOperator
,KeyedProcessOperator
,KeyedProcessOperator
,KeyedSortPartitionOperator
,KeyedStateBootstrapOperator
,KeyedTwoInputBroadcastProcessOperator
,KeyedTwoInputNonBroadcastProcessOperator
,KeyedTwoOutputProcessOperator
,LegacyKeyedCoProcessOperator
,LegacyKeyedProcessOperator
,LimitOperator
,LocalRuntimeFilterBuilderOperator
,LocalSlicingWindowAggOperator
,MapBundleOperator
,MapPartitionOperator
,MiniBatchStreamingJoinOperator
,NonBufferOverWindowOperator
,OneInput
,OutputConversionOperator
,PartitionAggregateOperator
,PartitionCommitter
,PartitionReduceOperator
,ProcessOperator
,ProcessOperator
,ProcTimeMiniBatchAssignerOperator
,ProcTimeSortOperator
,PythonScalarFunctionOperator
,PythonStreamGroupAggregateOperator
,PythonStreamGroupTableAggregateOperator
,PythonStreamGroupWindowAggregateOperator
,PythonTableFunctionOperator
,QueryableAppendingStateOperator
,QueryableValueStateOperator
,RankOperator
,RowKindSetter
,RowTimeMiniBatchAssginerOperator
,RowTimeSortOperator
,SecondInputOfTwoInput
,SinkOperator
,SinkUpsertMaterializer
,SortLimitOperator
,SortMergeJoinOperator
,SortOperator
,SortPartitionOperator
,SourceOperator
,StateBootstrapOperator
,StreamArrowPythonGroupWindowAggregateFunctionOperator
,StreamArrowPythonProcTimeBoundedRangeOperator
,StreamArrowPythonProcTimeBoundedRowsOperator
,StreamArrowPythonRowTimeBoundedRangeOperator
,StreamArrowPythonRowTimeBoundedRowsOperator
,StreamFilter
,StreamFlatMap
,StreamGroupedReduceOperator
,StreamingFileWriter
,StreamingJoinOperator
,StreamingSemiAntiJoinOperator
,StreamMap
,StreamProject
,StreamRecordTimestampInserter
,StreamSink
,StreamSortOperator
,StreamSource
,TableAggregateWindowOperator
,TableStreamOperator
,TemporalProcessTimeJoinOperator
,TemporalRowTimeJoinOperator
,TimestampsAndWatermarksOperator
,TwoInputBroadcastProcessOperator
,TwoInputNonBroadcastProcessOperator
,TwoOutputProcessOperator
,UnalignedWindowTableFunctionOperator
,UnionStreamOperator
,WatermarkAssignerOperator
,WindowAggOperator
,WindowJoinOperator
,WindowOperator
,WindowOperator
,WindowTableFunctionOperatorBase
@Internal public interface KeyContextHandler
This interface is used to optimize the calls ofInput.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>)
,StreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
andStreamOperator.setKeyContextElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
. We can decide(at the inputs/operators initialization) whether to omit the calls of "setKeyContextElement" according to the return value ofhasKeyContext()
. In this way, we can omit the calls of "setKeyContextElement" for inputs/operators that don't have "KeyContext".All inputs/operators that want to optimize the "setKeyContextElement" calls should implement this interface.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
hasKeyContext()
Whether theInput
has "KeyContext".default boolean
hasKeyContext1()
Whether the first input ofStreamOperator
has "KeyContext".default boolean
hasKeyContext2()
Whether the second input ofStreamOperator
has "KeyContext".
-
-
-
Method Detail
-
hasKeyContext
default boolean hasKeyContext()
Whether theInput
has "KeyContext". If false, we can omit the call ofInput.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>)
for each record.- Returns:
- True if the
Input
has "KeyContext", false otherwise.
-
hasKeyContext1
default boolean hasKeyContext1()
Whether the first input ofStreamOperator
has "KeyContext". If false, we can omit the call ofStreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
for each record arrived on the first input.- Returns:
- True if the first input has "KeyContext", false otherwise.
-
hasKeyContext2
default boolean hasKeyContext2()
Whether the second input ofStreamOperator
has "KeyContext". If false, we can omit the call ofStreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
for each record arrived on the second input.- Returns:
- True if the second input has "KeyContext", false otherwise.
-
-