flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #5573: [FLINK-8756][Client] Support ClusterClient.getAccu...
Date Sun, 25 Feb 2018 10:18:17 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5573#discussion_r170448311
  
    --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
---
    @@ -363,6 +367,27 @@ public String cancelWithSavepoint(JobID jobId, @Nullable String savepointDirecto
     		});
     	}
     
    +	@Override
    +	public Map<String, Object> getAccumulators(final JobID jobID) throws Exception
{
    +		final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance();
    +		final JobMessageParameters  params = new JobMessageParameters();
    +		params.jobPathParameter.resolve(jobID);
    +
    +		CompletableFuture<JobAccumulatorsInfo> responseFuture = sendRequest(
    +			accumulatorsHeaders,
    +			params
    +		);
    +
    +		return responseFuture.thenApply((accumulatorsInfo) -> {
    --- End diff --
    
    Adding types to lambdas is always a good idea.


---

Mime
View raw message