Unverified Commit 422fa9e4 authored by gaoyan's avatar gaoyan Committed by GitHub

[Fix-#2843]Yarn Application mode submission task failed, lack of log printing (#2844)

* The fixed issue is that the Yarn Application submission task is missing * The fixed issue is that the Yarn Application submission task is missing
parent edd9eb89
......@@ -325,7 +325,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
taskDTO.setStatementSet(true);
JobResult jobResult = taskServiceBean.executeJob(taskDTO);
if ((jobResult.getStatus() == Job.JobStatus.FAILED)) {
throw new BusException(jobResult.getError());
throw new RuntimeException(jobResult.getError());
}
log.info("Job Submit success");
Task task = new Task(submitDto.getId(), jobResult.getJobInstanceId());
......
......@@ -28,7 +28,10 @@ import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
/**
* BusException
* Prompt exception, after the exception is caught,
* it will look for internationalization prompts according to the code,
* the web will pop up the corresponding prompt
* Please do not use this exception for meaningless throwing
*
* @since 2021/5/28 14:21
*/
......@@ -81,7 +84,7 @@ public class BusException extends RuntimeException {
public static BusException valueOf(String code, Throwable e) {
String errMsg = ExceptionUtil.stacktraceToString(e);
log.error(errMsg);
return new BusException(code, errMsg);
return new BusException(code, e.getMessage());
}
/**
......
......@@ -24,7 +24,6 @@ import org.dinky.context.FlinkUdfPathContextHolder;
import org.dinky.gateway.enums.GatewayType;
import org.dinky.gateway.result.GatewayResult;
import org.dinky.gateway.result.KubernetesResult;
import org.dinky.utils.LogUtil;
import org.apache.flink.client.deployment.ClusterSpecification;
import org.apache.flink.client.program.ClusterClient;
......@@ -67,7 +66,7 @@ public class KubernetesSessionGateway extends KubernetesGateway {
result.setWebURL(clusterClient.getWebInterfaceURL());
result.success();
} catch (Exception e) {
result.fail(LogUtil.getError(e));
throw new RuntimeException(e);
}
return result;
}
......
......@@ -24,7 +24,6 @@ import org.dinky.data.model.SystemConfiguration;
import org.dinky.gateway.enums.GatewayType;
import org.dinky.gateway.result.GatewayResult;
import org.dinky.gateway.result.YarnResult;
import org.dinky.utils.LogUtil;
import org.apache.flink.client.deployment.ClusterSpecification;
import org.apache.flink.client.program.ClusterClient;
......@@ -98,7 +97,7 @@ public class YarnPerJobGateway extends YarnGateway {
}
result.success();
} catch (Exception e) {
result.fail(LogUtil.getError(e));
throw new RuntimeException(e);
}
return result;
}
......
......@@ -24,7 +24,6 @@ import org.dinky.context.FlinkUdfPathContextHolder;
import org.dinky.gateway.enums.GatewayType;
import org.dinky.gateway.result.GatewayResult;
import org.dinky.gateway.result.YarnResult;
import org.dinky.utils.LogUtil;
import org.apache.flink.client.deployment.ClusterSpecification;
import org.apache.flink.client.program.ClusterClient;
......@@ -63,7 +62,7 @@ public class YarnSessionGateway extends YarnGateway {
result.setWebURL(clusterClient.getWebInterfaceURL());
result.success();
} catch (Exception e) {
result.fail(LogUtil.getError(e));
throw new RuntimeException(e);
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment