You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Zili Chen (Jira)" <ji...@apache.org> on 2019/12/08 09:46:00 UTC

[jira] [Comment Edited] (FLINK-15129) Return JobClient instead of JobClient Future from executeAsync()

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

Zili Chen edited comment on FLINK-15129 at 12/8/19 9:45 AM:
------------------------------------------------------------

"but currently we always return an already completed future that contains the JobClient"

in {{AbstractSessionClusterExecutor}} we return an uncompleted future of the {{JobClient}}. And see also FLINK-14916 we towards an asynchronous version of deploying job cluster.


was (Author: tison):
"but currently we always return an already completed future that contains the JobClient"

in {{AbstractSessionClusterExecutor}} we return a uncompleted future of the {{JobClient}}.

> Return JobClient instead of JobClient Future from executeAsync()
> ----------------------------------------------------------------
>
>                 Key: FLINK-15129
>                 URL: https://issues.apache.org/jira/browse/FLINK-15129
>             Project: Flink
>          Issue Type: Sub-task
>          Components: API / DataSet, API / DataStream
>            Reporter: Aljoscha Krettek
>            Priority: Major
>
> Currently, users have to write this when they want to use the {{JobClient}}:
> {code}
> CompletableFuture<JobClient> jobClientFuture = env.executeAsync();
> JobClient jobClient = jobClientFuture.get();
> // or use thenApply/thenCompose etc.
> {code}
> instead we could always return a {{JobClient}} right away and therefore remove one step for the user.
> I don't know if it's always the right choice, but currently we always return an already completed future that contains the {{JobClient}}. In the future we might want to return a future that actually completes at some later point, we would not be able to do this if we directly return a {{JobClient}} and would have to block in {{executeAsync()}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)