Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/3377#discussion_r102464984
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
---
@@ -1292,10 +1292,28 @@ public boolean updateState(TaskExecutionState
state) {
}
return true;
case CANCELED:
- attempt.cancelingComplete();
+ AccumulatorSnapshot acc1 =
state.getAccumulators();
+ Map<String, Accumulator<?, ?>> userAcc1
= null;
+ if (acc1 != null) {
+ try {
+ userAcc1 =
acc1.deserializeUserAccumulators(userClassLoader);
+ } catch (Exception e) {
+ LOG.error("Failed to
deserialize final accumulator results.", e);
+ }
+ }
+ attempt.cancelingComplete(userAcc1,
state.getIOMetrics());
return true;
case FAILED:
-
attempt.markFailed(state.getError(userClassLoader));
+ AccumulatorSnapshot acc2 =
state.getAccumulators();
+ Map<String, Accumulator<?, ?>> userAcc2
= null;
+ if (acc2 != null) {
+ try {
+ userAcc2 =
acc2.deserializeUserAccumulators(userClassLoader);
+ } catch (Exception e) {
+ LOG.error("Failed to
deserialize final accumulator results.", e);
+ }
+ }
--- End diff --
Can this deserialization logic be factored out into a method?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---