Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2646

User functions should be able to differentiate between successful close and erroneous close

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Staged
    • 0.10.0
    • None
    • API / DataStream

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sewen Stephan Ewen
            Votes:
            5 Vote for this issue
            Watchers:
            18 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: