New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getApplications API call and use it for Yarn app killing #3150
base: master
Are you sure you want to change the base?
Add getApplications API call and use it for Yarn app killing #3150
Conversation
9aaef0b
to
ecee390
Compare
* @return the set of all to-be-killed (alive) yarn applications' IDs | ||
* @throws IOException for RPC issue | ||
* @throws YarnException for YARN server issue | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1: call yarn cluster to get app-report and transform to app-ids
* @param jobProps should contain flow execution id, and the job log file's path | ||
* @param log logger | ||
* @return the set of application ids | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2: helper method first call yarnClient, with fallback to scan log
* @throws IOException for RPC issue | ||
* @throws YarnException for YARN server issue | ||
*/ | ||
public static Set<String> getAllAliveAppIDsByExecID(final YarnClient yarnClient, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would like to return the ApplicationReport from this method and create another method for application id. Since we need to get the user from ApplicationReport as well, if we write it in the current way, we need to have another call to get the user.
… tag and un-finished application states
…-scanning as fallback
ecee390
to
23ca091
Compare
Follow up of #3145
Issue to solve: Upgrade of the yarn application killing logic in normal hadoop job cancel procedure
Changes made: Use yarnClient to get alive YARN application ids & use this method as first choice prior to log-scanning approach
Testing done: