Unverified Commit 858fbd45 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Fix-596][admin] Fix NPE on running yarn per-job app

[Fix-596][admin] Fix NPE on running yarn per-job app
parents 406657e2 2bf5fd5e
...@@ -108,8 +108,11 @@ public class Task extends SuperEntity { ...@@ -108,8 +108,11 @@ public class Task extends SuperEntity {
map.put(item.get("key"), item.get("value")); map.put(item.get("key"), item.get("value"));
} }
} }
return new JobConfig(type, step, false, false, useRemote, clusterId, clusterConfigurationId, jarId, getId(), int jid = Asserts.isNull(jarId) ? 0 : jarId;
alias, fragment, statementSet, batchModel, checkPoint, parallelism, savePointStrategy, savePointPath, map); boolean fg = Asserts.isNull(fragment) ? false : fragment;
boolean sts = Asserts.isNull(statementSet) ? false : statementSet;
return new JobConfig(type, step, false, false, useRemote, clusterId, clusterConfigurationId,jid, getId(),
alias, fg, sts, batchModel, checkPoint, parallelism, savePointStrategy, savePointPath, map);
} }
} }
...@@ -525,7 +525,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen ...@@ -525,7 +525,7 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
private JobConfig buildJobConfig(Task task) { private JobConfig buildJobConfig(Task task) {
boolean isJarTask = Dialect.FLINKJAR.equalsVal(task.getDialect()); boolean isJarTask = Dialect.FLINKJAR.equalsVal(task.getDialect());
if (!isJarTask && task.getFragment()) { if (!isJarTask && Asserts.isNotNull(task.getFragment())?task.getFragment():false) {
String flinkWithSql = dataBaseService.getEnabledFlinkWithSql(); String flinkWithSql = dataBaseService.getEnabledFlinkWithSql();
if (Asserts.isNotNullString(flinkWithSql)) { if (Asserts.isNotNullString(flinkWithSql)) {
task.setStatement(flinkWithSql + "\r\n" + task.getStatement()); task.setStatement(flinkWithSql + "\r\n" + task.getStatement());
......
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