[ 
https://issues.apache.org/jira/browse/BEAM-6751?focusedWorklogId=212542&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-212542
 ]

ASF GitHub Bot logged work on BEAM-6751:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Mar/19 17:34
            Start Date: 13/Mar/19 17:34
    Worklog Time Spent: 10m 
      Work Description: tweise commented on pull request #7991: [BEAM-6751] Add 
KafkaIO EOS support to Flink via @RequiresStableInput
URL: https://github.com/apache/beam/pull/7991#discussion_r265248274
 
 

 ##########
 File path: 
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
 ##########
 @@ -683,18 +721,25 @@ protected final void invokeFinishBundle() {
   }
 
   @Override
-  public void snapshotState(StateSnapshotContext context) throws Exception {
-
-    // Forced finish a bundle in checkpoint barrier otherwise may lose data.
-    // Careful, it use OperatorState or KeyGroupState to store outputs, So it
-    // must be called before their snapshot.
+  public final void snapshotState(StateSnapshotContext context) throws 
Exception {
+    // We can't output here anymore because the checkpoint barrier has already 
been
+    // sent downstream. This is going to change with 1.6/1.7's 
prepareSnapshotBarrier.
     outputManager.openBuffer();
     invokeFinishBundle();
     outputManager.closeBuffer();
 
     super.snapshotState(context);
   }
 
+  @Override
+  public final void notifyCheckpointComplete(long checkpointId) throws 
Exception {
+    super.notifyCheckpointComplete(checkpointId);
+    // We have to release all buffered data collected during checkpointing
 
 Review comment:
   "This method is called as a notification once a distributed checkpoint has 
been completed."
   
   
https://github.com/apache/flink/blob/release-1.5/flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointListener.java#L40
   
   Doesn't that mean that elements can be processed between `snapshotState` and 
`notifyCheckpointComplete`. And if so, we should not emit those elements since 
they are not part of the checkpoint?
   
   Regarding the comment, all I can say is that it does not resonate. The 
elements are not collected "during" checkpointing, but rather between 
checkpoints.
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 212542)
    Time Spent: 6h 20m  (was: 6h 10m)

> KafkaIO's EOS mode does not work with FlinkRunner
> -------------------------------------------------
>
>                 Key: BEAM-6751
>                 URL: https://issues.apache.org/jira/browse/BEAM-6751
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-kafka, runner-flink
>            Reporter: Maximilian Michels
>            Assignee: Maximilian Michels
>            Priority: Major
>             Fix For: 2.12.0
>
>          Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> KafkaIO has a validation check which whitelists certain runners capable of 
> provide exactly-once semantics:
> {noformat}
>         if ("org.apache.beam.runners.direct.DirectRunner".equals(runner)
>             || runner.startsWith("org.apache.beam.runners.dataflow.")
>             || runner.startsWith("org.apache.beam.runners.spark.") {
> ...
> {noformat}
> The Flink supports exactly-once checkpointing but the Flink Runner can't 
> utilize it in the way KafkaIO intends it.
> I think we should remove the check in favor of checking for translation of 
> {{@RequiresStableInput}}. Changes to KafkaIO might have to be made to support 
> EOS efficiently with the Flink Runner.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to