登录resource manager所在服务器,
进入/var/log/hadoop-yarn/yarn
tail rm-audit.log 读取日志,找到如下内容:
2018-10-31 07:11:27,148 INFO resourcemanager.RMAuditLogger: USER=admin OPERATION=Application Finished - Succeeded TARGET=RMAppManager RESULT=SUCCESS APPID=application_1540980262416_0022
之后,su spark,切换到spark用户下,执行:
yarn logs -applicationId application_1540980262416_0022
即可查看spark任务的日志