You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2016/09/27 11:52:29 UTC

[GitHub] flink pull request #2554: [FLINK-4361] Introduce Flink's own future abstract...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/2554

    [FLINK-4361] Introduce Flink's own future abstraction

    Flink's future abstraction whose API is similar to Java 8's CompletableFuture.
    That's in order to ease a future transition to this class once we ditch Java 7.
    The current set of operations comprises:
    
    - isDone to check the completion of the future
    - get/getNow to obtain the future's value
    - cancel to cancel the future (best effort basis)
    - thenApplyAsync to transform the future's value into another value
    - thenAcceptAsync to register a callback for a successful completion of the future
    - exceptionallyAsync to register a callback for an exception completion of the future
    - thenComposeAsync to transform the future's value and flatten the returned future
    - handleAsync to register a callback which is called either with the regular result
    or the exceptional result
    
    Additionally, Flink offers a CompletableFuture which can be completed with a regular
    value or an exception:
    
    - complete/completeExceptionally
    
    Complete FlinkCompletableFuture exceptionally with a CanellationException upon cancel
    
    This closes #2472.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink futuresMaster

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2554.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2554
    
----
commit f7919121411f054396940af9c70952d4121baf52
Author: Till Rohrmann <tr...@apache.org>
Date:   2016-09-02T19:13:34Z

    [FLINK-4361] Introduce Flink's own future abstraction
    
    Flink's future abstraction whose API is similar to Java 8's CompletableFuture.
    That's in order to ease a future transition to this class once we ditch Java 7.
    The current set of operations comprises:
    
    - isDone to check the completion of the future
    - get/getNow to obtain the future's value
    - cancel to cancel the future (best effort basis)
    - thenApplyAsync to transform the future's value into another value
    - thenAcceptAsync to register a callback for a successful completion of the future
    - exceptionallyAsync to register a callback for an exception completion of the future
    - thenComposeAsync to transform the future's value and flatten the returned future
    - handleAsync to register a callback which is called either with the regular result
    or the exceptional result
    
    Additionally, Flink offers a CompletableFuture which can be completed with a regular
    value or an exception:
    
    - complete/completeExceptionally
    
    Complete FlinkCompletableFuture exceptionally with a CanellationException upon cancel
    
    This closes #2472.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #2554: [FLINK-4361] Introduce Flink's own future abstract...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/2554


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #2554: [FLINK-4361] Introduce Flink's own future abstraction

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2554
  
    This is very nice, +1 to merge this.
    Will come in very handy!
    
    I like that this is pretty much aligned with the Java 8 futures.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---