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

Renaming AsyncCollector into ResultPromise/ResultFuture

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0, 1.3.0
    • 1.4.0
    • API / DataStream
    • Hide
      The API of AsyncFunction is changed. The type of object handed to {{asyncInvoke()}} is now {{ResultFuture}} instead of {{AsyncCollector}}. In order to complete the future with the result one has to call {{ResultFuture#complete}} or {{ResultFuture#completeExceptionally}} in case of an exceptional completion.
      Show
      The API of AsyncFunction is changed. The type of object handed to {{asyncInvoke()}} is now {{ResultFuture}} instead of {{AsyncCollector}}. In order to complete the future with the result one has to call {{ResultFuture#complete}} or {{ResultFuture#completeExceptionally}} in case of an exceptional completion.

    Description

      Currently, the async I/O API gives an AsyncCollector to an AsyncFunction implementation. The name does not really reflect what the AsyncCollector does since it does not collect but is actually a one time completable future. Therefore, I propose to rename the AsyncCollector into ResultPromise or ResultFuture. This is API changing.

      Attachments

        Issue Links

          Activity

            People

              mingleizhang zhangminglei
              trohrmann Till Rohrmann
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: