[FIX-3900][server] kill multi yarn app in one job#4042
[FIX-3900][server] kill multi yarn app in one job#4042davidzollo merged 11 commits intoapache:devfrom Eights-Li:dev-kill-yarn-app
Conversation
...hinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
Show resolved
Hide resolved
lenboo
left a comment
There was a problem hiding this comment.
some code smell can be wiped out.
...hinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
Outdated
Show resolved
Hide resolved
...hinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
Show resolved
Hide resolved
…duler into dev-kill-yarn-job
Codecov Report
@@ Coverage Diff @@
## dev #4042 +/- ##
============================================
+ Coverage 39.39% 39.49% +0.10%
- Complexity 2968 2981 +13
============================================
Files 467 467
Lines 22104 22113 +9
Branches 2712 2714 +2
============================================
+ Hits 8708 8734 +26
+ Misses 12589 12570 -19
- Partials 807 809 +2
Continue to review full report at Codecov.
|
| FileUtils.writeStringToFile(new File(commandFile), sb.toString(), StandardCharsets.UTF_8); | ||
| } | ||
|
|
||
| String runCmd = "sh " + commandFile; |
There was a problem hiding this comment.
is this "sh " can be instead?
I can find it elsewhere.
| mat = MACPATTERN.matcher(pids); | ||
| } | ||
| } else { | ||
| String pids = OSUtils.exeCmd("pstree -p " + processId); |
There was a problem hiding this comment.
i think this "pstree " can be extracted to one variable, then I can easily replace this variable.
lenboo
left a comment
There was a problem hiding this comment.
other magic numbers exists.
…duler into dev-kill-yarn-job
| } | ||
|
|
||
| logger.info("kill cmd:{}", runCmd); | ||
| Runtime.getRuntime().exec(runCmd); |
There was a problem hiding this comment.
please use OSUtils.exeCmd method instead,thx
davidzollo
left a comment
There was a problem hiding this comment.
don't use Runtime.getRuntime().exec directly, replace with OSUtils.exeCmd, thx
|
Kudos, SonarCloud Quality Gate passed!
|
|
What is the purpose of the pull request
fix #3900 kill multi yarn app in one job
Brief change log
Verify this pull request