flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8299) Retrieve ExecutionResult by REST polling
Date Mon, 08 Jan 2018 12:26:00 GMT

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

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

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5207#discussion_r160127783
  
    --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
---
    @@ -104,11 +122,26 @@ protected JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader
classLoad
     		} catch (JobSubmissionException e) {
     			throw new ProgramInvocationException(e);
     		}
    -		// don't return just a JobSubmissionResult here, the signature is lying
    -		// The CliFrontend expects this to be a JobExecutionResult
     
    -		// TOOD: do not exit this method until job is finished
    -		return new JobExecutionResult(jobGraph.getJobID(), 1, Collections.emptyMap());
    +		final JobExecutionResult jobExecutionResult = waitForJobExecutionResult(jobGraph.getJobID());
    +
    +		if (jobExecutionResult.getSerializedThrowable().isPresent()) {
    +			final SerializedThrowable serializedThrowable = jobExecutionResult.getSerializedThrowable().get();
    +			final Throwable throwable = serializedThrowable.deserializeError(classLoader);
    +			throw new ProgramInvocationException(throwable);
    +		}
    +
    +		try {
    +			// don't return just a JobSubmissionResult here, the signature is lying
    +			// The CliFrontend expects this to be a JobExecutionResult
    +			this.lastJobExecutionResult = new SerializedJobExecutionResult(
    +				jobExecutionResult.getJobId(),
    +				jobExecutionResult.getNetRuntime(),
    +				jobExecutionResult.getAccumulatorResults()).toJobExecutionResult(classLoader);
    --- End diff --
    
    We could also directly use `AccumulatorHelper#deserializeAccumulators`.


> Retrieve ExecutionResult by REST polling
> ----------------------------------------
>
>                 Key: FLINK-8299
>                 URL: https://issues.apache.org/jira/browse/FLINK-8299
>             Project: Flink
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 1.5.0
>            Reporter: Gary Yao
>            Assignee: Gary Yao
>            Priority: Blocker
>              Labels: flip-6
>             Fix For: 1.5.0
>
>
> Retrieve the {{ExecutionResult}} from a finished Flink job via the {{RestClusterClient}}.



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

Mime
View raw message