tingxi opened a new issue #5186:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/5186
**Describe the bug**
When we restart the DS server, DS kills all the yarn apps.It happens when
the task contains commands
**To Reproduce**
**Expected behavior**
A clear and concise description of what you expected to happen.
1. Create a DS shell task with the command: yarn application -list
2. Restart the DS server after starting the task
3. Then you will see all the yarn apps will be killed by DS.
**Screenshots**
**Which version of Dolphin Scheduler:**
-[1.3.5]
**Additional context**
**Requirement or improvement**
DS will store the task execution log in the temporary log file, which
contains the yarn app ids , so that DS service can restart the task after it is
restarted.
The point is that DS only performs regular matching on yarn application id,
and kill & restart yarn app ids. **{@link
org.apache.dolphinscheduler.server.utils.ProcessUtils#killYarnJob()}**,that
method will get all the app ids from {@param taskExecutionContext} by {@method
taskExecutionContext.getLogPath()}.
Repair suggestion: add salt value to the yarn app ids in the log, and get
app ids after matching the salt value in **LoggerUtils#getAppIds** method when
restarting.
--
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]