YARN-11180. Refactor some code of getNewApplication, submitApplication etc. (#4618)

3 files changed