You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (Jira)" <ji...@apache.org> on 2020/07/23 11:45:00 UTC

[jira] [Commented] (FLINK-18685) JobClient.getAccumulators() blocks until streaming job has finished in local environment

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

Robert Metzger commented on FLINK-18685:
----------------------------------------

I see two solutions
a) change the Javadocs
b) Change the {{PerJobMiniClusterJobClient}} to allow accessing the accumulators before the job has finished.

> JobClient.getAccumulators() blocks until streaming job has finished in local environment
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-18685
>                 URL: https://issues.apache.org/jira/browse/FLINK-18685
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>    Affects Versions: 1.11.0
>            Reporter: Robert Metzger
>            Priority: Major
>
> *Steps to reproduce:*
> {code:java}
> JobClient client = env.executeAsync("Test");
> CompletableFuture<JobStatus> status = client.getJobStatus();
> LOG.info("status = " + status.get());
> CompletableFuture<Map<String, Object>> accumulators = client.getAccumulators(StreamingJob.class.getClassLoader());
> LOG.info("accus = " + accumulators.get(5, TimeUnit.SECONDS));
> {code}
> *Actual behavior*
> The accumulators future will never complete for a streaming job when calling this just in your main() method from the IDE.
> *Expected behavior*
> Receive the accumulators of the running streaming job.
> The JavaDocs of the method state the following: "Accumulators can be requested while it is running or after it has finished.". 
> While it is technically true that I can request accumulators, I was expecting as a user that I can access the accumulators of a running job.
> Also, I can request accumulators if I submit the job to a cluster.



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