[
https://issues.apache.org/jira/browse/FLINK-2646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17023777#comment-17023777
]
Guowei Ma commented on FLINK-2646:
----------------------------------
Thanks [~kkl0u] for your detailed comment on the difference between the CP and
EOI. That is also what I was thinking. If there is no difference between them
at all we might not need to expose the EOI interface to the DataStream user for
this scenario. For example, the user could finalize in-progress file in the
dispose stage. (Sometime user could cancel the job and use the sink result). Of
course, this could introduce some of the cost for only a canceling job scenario
and I think the cost might be the same in the failover scenarios. Do you have
some concerns about this? Enlighten me please if I missing something.
> User functions should be able to differentiate between successful close and
> erroneous close
> -------------------------------------------------------------------------------------------
>
> Key: FLINK-2646
> URL: https://issues.apache.org/jira/browse/FLINK-2646
> Project: Flink
> Issue Type: Improvement
> Components: API / DataStream
> Affects Versions: 0.10.0
> Reporter: Stephan Ewen
> Assignee: Kostas Kloudas
> Priority: Major
> Labels: usability
>
> Right now, the {{close()}} method of rich functions is invoked in case of
> proper completion, and in case of canceling in case of error (to allow for
> cleanup).
> In certain cases, the user function needs to know why it is closed, whether
> the task completed in a regular fashion, or was canceled/failed.
> I suggest to add a method {{closeAfterFailure()}} to the {{RichFunction}}. By
> default, this method calls {{close()}}. The runtime is the changed to call
> {{close()}} as part of the regular execution and {{closeAfterFailure()}} in
> case of an irregular exit.
> Because by default all cases call {{close()}} the change would not be API
> breaking.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)