[
https://issues.apache.org/jira/browse/BEAM-6868?focusedWorklogId=475741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-475741
]
ASF GitHub Bot logged work on BEAM-6868:
----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Aug/20 07:56
Start Date: 28/Aug/20 07:56
Worklog Time Spent: 10m
Work Description: mxm commented on a change in pull request #12706:
URL: https://github.com/apache/beam/pull/12706#discussion_r478904282
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -191,6 +194,17 @@
private final boolean finishBundleBeforeCheckpointing;
+ /** Stores new finalizations being gathered. */
+ private transient InMemoryBundleFinalizer bundleFinalizer;
+ /** Pending bundle finalizations which have not been acknowledged yet. */
+ private transient LinkedHashMap<Long,
List<InMemoryBundleFinalizer.Finalization>>
+ pendingFinalizations;
+ /**
+ * Keep a maximum of 32 bundle finalizations for {@link
+ * BundleFinalizer.Callback#onBundleSuccess()}.
+ */
+ private static final int MAX_NUMBER_PENDING_BUNDLE_FINALIZATIONS = 32;
Review comment:
This constant appears to be unused.
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -905,6 +928,19 @@ public final void notifyCheckpointComplete(long
checkpointId) throws Exception {
bufferingDoFnRunner.checkpointCompleted(checkpointId);
}
+ List<InMemoryBundleFinalizer.Finalization> finalizations =
+ pendingFinalizations.get(checkpointId);
+ if (finalizations != null) {
+ // remove old finalizations except for the current one
+ pendingFinalizations.clear();
+ pendingFinalizations.put(checkpointId, finalizations);
+
+ // confirm all finalizations
+ for (InMemoryBundleFinalizer.Finalization finalization : finalizations) {
+ finalization.getCallback().onBundleSuccess();
Review comment:
Acknowledging the latest bundle finalize will also acknowledge all
earlier requests for bundle finalization?
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -905,6 +928,19 @@ public final void notifyCheckpointComplete(long
checkpointId) throws Exception {
bufferingDoFnRunner.checkpointCompleted(checkpointId);
}
+ List<InMemoryBundleFinalizer.Finalization> finalizations =
+ pendingFinalizations.get(checkpointId);
+ if (finalizations != null) {
+ // remove old finalizations except for the current one
+ pendingFinalizations.clear();
Review comment:
The default is to have just one checkpoint at a given time, but users
can configure concurrent checkpointing which can ack checkpoints out of order.
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -905,6 +928,19 @@ public final void notifyCheckpointComplete(long
checkpointId) throws Exception {
bufferingDoFnRunner.checkpointCompleted(checkpointId);
}
+ List<InMemoryBundleFinalizer.Finalization> finalizations =
+ pendingFinalizations.get(checkpointId);
+ if (finalizations != null) {
+ // remove old finalizations except for the current one
+ pendingFinalizations.clear();
+ pendingFinalizations.put(checkpointId, finalizations);
Review comment:
Why is this one pending when we acknowledge it below?
----------------------------------------------------------------
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: 475741)
Time Spent: 40m (was: 0.5h)
> Flink runner supports Bundle Finalization
> -----------------------------------------
>
> Key: BEAM-6868
> URL: https://issues.apache.org/jira/browse/BEAM-6868
> Project: Beam
> Issue Type: New Feature
> Components: cross-language, runner-flink
> Reporter: Boyuan Zhang
> Priority: P1
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)