[ 
https://issues.apache.org/jira/browse/FLINK-7940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224046#comment-16224046
 ] 

ASF GitHub Bot commented on FLINK-7940:
---------------------------------------

GitHub user tillrohrmann opened a pull request:

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

    [FLINK-7940] Add FutureUtils.orTimeout

    ## What is the purpose of the change
    
    This commit adds a convenience function `FutureUtils#orTimeout` which 
allows to easily add a timeout to
    a CompletableFuture.
    
    ## Verifying this change
    
    - Added `FutureUtilsTest#testOrTimeout`
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable)
    


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

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

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

    https://github.com/apache/flink/pull/4918.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 #4918
    
----
commit 83e52f5458379855c481fe169f6be50a8afee336
Author: Till Rohrmann <trohrm...@apache.org>
Date:   2017-10-29T15:01:18Z

    [hotfix] Remove redundant FutureUtils#getFailedFuture
    
    FutureUtils#completedExceptionally does exactly the same.

commit 94b3d14bc2ba64a4862bd83e670f3dbfccdf96b8
Author: Till Rohrmann <trohrm...@apache.org>
Date:   2017-10-29T15:38:53Z

    [FLINK-7940] Add FutureUtils.orTimeout
    
    This commit adds a convenience function which allows to easily add a 
timeout to
    a CompletableFuture.

----


> Add timeout for futures
> -----------------------
>
>                 Key: FLINK-7940
>                 URL: https://issues.apache.org/jira/browse/FLINK-7940
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination
>    Affects Versions: 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>
> In order to conveniently timeout futures, we should add tooling to 
> {{FutureUtils}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to