@Internal public interface KeyContextHandler
Input.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>)
, StreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
and StreamOperator.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 of hasKeyContext()
. 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.
Modifier and Type | Method and Description |
---|---|
default boolean |
hasKeyContext()
Whether the
Input has "KeyContext". |
default boolean |
hasKeyContext1()
Whether the first input of
StreamOperator has "KeyContext". |
default boolean |
hasKeyContext2()
Whether the second input of
StreamOperator has "KeyContext". |
default boolean hasKeyContext()
Input
has "KeyContext". If false, we can omit the call of Input.setKeyContextElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>)
for each record.Input
has "KeyContext", false otherwise.default boolean hasKeyContext1()
StreamOperator
has "KeyContext". If false, we can omit the
call of StreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
for each record arrived on the first
input.default boolean hasKeyContext2()
StreamOperator
has "KeyContext". If false, we can omit
the call of StreamOperator.setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<?>)
for each record arrived on the
second input.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.