dawidwys commented on a change in pull request #15771:
URL: https://github.com/apache/flink/pull/15771#discussion_r636874029
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
##########
@@ -243,6 +240,13 @@ public void setup(
stateKeySelector2 = config.getStatePartitioner(1,
getUserCodeClassloader());
}
+ private CombinedWatermark setupCombinedWatermark() {
+ CombinedWatermark combinedWatermark = new CombinedWatermark();
+ combinedWatermark.add(new CombinedWatermark.PartialWatermark());
+ combinedWatermark.add(new CombinedWatermark.PartialWatermark());
Review comment:
So there are two things here. My comment in this thread referred just to
the `add` method, not exposing the `PartialWatermark`. Sure, if the issue was
just about the `add` method, I would not expose the `PartialWatermark`.
The second problem is the combination of `PartialWatermark` and
`updateCombinedWatermark`. Actually, you wrote the exact reason why we need it:
> However, the current way may still be valid if you explicitly want to have
the information drift and only update at specific times for performance
reasons. I'm currently not in the position to assess that properly.
That's exactly what happens in the `WatermarkOutputMultiplexer`. It exposes
two access patterns:
* getImmediateOutput
* getDeferredOutput
One immediately updates the combined watermark, and the other one does not.
AFAIK the deferred one is used for periodic watermarks. Bear in mind that the
`PeriodicWatermark` has the default scope. It is exposed only to the
`org.apache.flink.api.common.eventtime` package for it to be used by
`WatermarkOutputMultiplexer`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]