kl0u commented on a change in pull request #14028:
URL: https://github.com/apache/flink/pull/14028#discussion_r527559495



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
##########
@@ -669,13 +669,14 @@ public JobExecutionResult executeJobBlocking(JobGraph 
job) throws JobExecutionEx
                try {
                        jobResult = jobResultFuture.get();
                } catch (ExecutionException e) {
-                       throw new JobExecutionException(job.getJobID(), "Could 
not retrieve JobResult.", ExceptionUtils.stripExecutionException(e));
+                       throw new JobExecutionException(job.getJobID(), 
ApplicationStatus.UNKNOWN,
+                                       "Could not retrieve JobResult.", 
ExceptionUtils.stripExecutionException(e));
                }
 
                try {
                        return 
jobResult.toJobExecutionResult(Thread.currentThread().getContextClassLoader());
                } catch (IOException | ClassNotFoundException e) {
-                       throw new JobExecutionException(job.getJobID(), e);
+                       throw new JobExecutionException(job.getJobID(), 
jobResult.getApplicationStatus(), e);

Review comment:
       Maybe this is a nice middle ground @SteNicholas . Have the status as 
`SUCCESS` and a message that says that something went wrong during getting the 
result. As a sidenote, it may be that this could require a new type of 
exception in the future (not necessarily in this PR) as it seems that we are 
using the same exception for different purposes. One is successful job 
execution (or not) and the other is successful job result translation (or not). 
   
   This was also a discussion we had offline with @SteNicholas ;)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to