pnowojski commented on a change in pull request #16582:
URL: https://github.com/apache/flink/pull/16582#discussion_r681106908
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamOperatorWrapper.java
##########
@@ -100,6 +102,16 @@ public void notifyCheckpointComplete(long checkpointId)
throws Exception {
}
}
+ public void notifyCheckpointSubsumed(long checkpointId) throws Exception {
+ if (!closed) {
+ if (wrapped instanceof AbstractStreamOperator) {
+ ((AbstractStreamOperator<?>)
wrapped).notifyCheckpointSubsumed(checkpointId);
+ } else if (wrapped instanceof AbstractStreamOperatorV2) {
+ ((AbstractStreamOperatorV2<?>)
wrapped).notifyCheckpointSubsumed(checkpointId);
+ }
Review comment:
That's a tough call. It should follow the hierarchy and `StreamOperator`
shouldn't be the public API (we are planning to remove it from the public api
at some point). But as it is, it doesn't matter if you add this method to
`StreamOperator` or `AbstractStreamOperator`, because all practical cases for
implementing a custom `StreamOperator` are always extending from
`AbstractStreamOperator`. So I would propose to call
`notifyCheckpointSubsumed()` via `getKeyedStateBackend()` for now. Later, once
we remove `StreamOperator` from public API we can change it back.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]