gabrywu opened a new issue #4025:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/4025
**Describe the question**
For now, if we execute a yarn job in a SHELL script, we find the application
IDs in the logs by regex 'application_\d+_\d+'.
I think it's so ugly and has performance issues. So I suggest that we
register an aspect when executing 'yarn jar' command,
we can weave a join point to
org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.submitApplication, where
we can get the submitted application id and the tracking URL, and output them
into one local file
**Which version of DolphinScheduler:**
- all version
**Describe alternatives you've considered**
add the following two env to global envs
`export YARN_CLIENT_OPTS="-javaagent:/pathto/aspectjweaver-1.9.6.jar"`
`export YARN_USER_CLASSPATH=/pathto/Aop2YarnClient-1.0-SNAPSHOT.jar`
Then when submitting applications to the yarn cluster, the aspect in
Aop2YarnClient-1.0-SNAPSHOT.jar will be registered, and we can get the
submitted application id and the tracking URL
This is an example, I just output the application id to console

----------------------------------------------------------------
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]