[Bug][Master] remove check with executePath when kill yarn job#5552
[Bug][Master] remove check with executePath when kill yarn job#5552CalvinKirs merged 3 commits intoapache:devfrom
Conversation
vimacro
left a comment
There was a problem hiding this comment.
modify this:
cancelApplication(appIds, logger, taskExecutionContext.getTenantCode(), taskExecutionContext.getExecutePath());
remove taskExecutionContext.getExecutePath()
| throw new RuntimeException("task instance work dir is empty"); | ||
| } | ||
| if (CollectionUtils.isNotEmpty(appIds)) { | ||
| cancelApplication(appIds, logger, taskExecutionContext.getTenantCode(), taskExecutionContext.getExecutePath()); |
There was a problem hiding this comment.
taskExecutionContext.getExecutePath() should remove
|
maybe the sudo -u tenantCode will throw NPE error? |
| taskExecutionContext.getProcessDefineVersion(), | ||
| taskExecutionContext.getProcessInstanceId(), | ||
| taskExecutionContext.getTaskInstanceId())); | ||
| FileUtils.createWorkDirIfAbsent(taskExecutionContext.getExecutePath()); |
There was a problem hiding this comment.
mv FileUtils.createWorkDirIfAbsent(taskExecutionContext.getExecutePath());
to if outside
Codecov Report
@@ Coverage Diff @@
## dev #5552 +/- ##
============================================
- Coverage 46.74% 46.72% -0.02%
+ Complexity 3786 3784 -2
============================================
Files 605 605
Lines 24791 24794 +3
Branches 2811 2811
============================================
- Hits 11588 11586 -2
- Misses 12096 12099 +3
- Partials 1107 1109 +2
Continue to review full report at Codecov.
|
|
Kudos, SonarCloud Quality Gate passed! |
@zhanguohao ptal |
Purpose of the pull request
when worker is down, a master trigger worker tolerance,
when handle a yarn task tolerance, it first kill the yarn job by yarn rest api and make the task state to NEED_FAULT_TOLERANCE,
so the task can scheduler by master.
bug detail
the check make the yarn job not killed, but re submit by another worker。
it will make the yarn running duplicated biz application.
change
This change added tests and can be verified as follows:
so remove the check code.
just get the applocationId and kill it ,no need to check the executePath.
issue link to #5550