SteNicholas commented on a change in pull request #14028: URL: https://github.com/apache/flink/pull/14028#discussion_r529622200
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/client/JobExecutionException.java ########## @@ -19,41 +19,67 @@ package org.apache.flink.runtime.client; import org.apache.flink.api.common.JobID; +import org.apache.flink.runtime.clusterframework.ApplicationStatus; import org.apache.flink.util.FlinkException; /** * This exception is the base exception for all exceptions that denote any failure during - * the execution of a job. + * the execution of a job, and signal the failure of an application with a given + * {@link ApplicationStatus}. */ public class JobExecutionException extends FlinkException { private static final long serialVersionUID = 2818087325120827525L; private final JobID jobID; + private final ApplicationStatus status; + /** * Constructs a new job execution exception. * - * @param jobID The job's ID. - * @param msg The cause for the execution exception. - * @param cause The cause of the exception + * @param jobID The job's ID. + * @param status The application status. + * @param msg The cause for the execution exception. + * @param cause The cause of the exception */ - public JobExecutionException(JobID jobID, String msg, Throwable cause) { + public JobExecutionException(JobID jobID, ApplicationStatus status, String msg, Throwable cause) { super(msg, cause); this.jobID = jobID; + this.status = status; Review comment: @tillrohrmann , no, there is a case that `jobResult.toJobExecutionResult` throws excepton with `SUCCEEDED` application status. ---------------------------------------------------------------- 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: us...@infra.apache.org