CalvinKirs commented on a change in pull request #4936:
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/4936#discussion_r586353869
##########
File path:
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskKillProcessor.java
##########
@@ -128,18 +129,16 @@ public void process(Channel channel, Command command) {
logger.info("process id:{}, cmd:{}",
taskExecutionContext.getProcessId(), cmd);
OSUtils.exeCmd(cmd);
-
- // find log and kill yarn job
- appIds =
killYarnJob(Host.of(taskExecutionContext.getHost()).getIp(),
- taskExecutionContext.getLogPath(),
- taskExecutionContext.getExecutePath(),
- taskExecutionContext.getTenantCode());
-
- return Pair.of(true, appIds);
} catch (Exception e) {
+ flag = false;
logger.error("kill task error", e);
}
- return Pair.of(false, appIds);
+ // find log and kill yarn job
+ appIds = killYarnJob(Host.of(taskExecutionContext.getHost()).getIp(),
+ taskExecutionContext.getLogPath(),
+ taskExecutionContext.getExecutePath(),
+ taskExecutionContext.getTenantCode());
+ return Pair.of(flag, appIds);
Review comment:
The killYarnJob operation is not absolutely successful
----------------------------------------------------------------
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]