作业启动注释添加

This commit is contained in:
LingZhaoHui 2023-12-07 22:58:36 +08:00
parent a79791fb92
commit b58553bb1e
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC
3 changed files with 3 additions and 0 deletions

View File

@ -1676,6 +1676,7 @@ public static void main(String[] args) {
ShutdownHookManager.get().addShutdownHook( ShutdownHookManager.get().addShutdownHook(
new MRAppMasterShutdownHook(appMaster), SHUTDOWN_HOOK_PRIORITY); new MRAppMasterShutdownHook(appMaster), SHUTDOWN_HOOK_PRIORITY);
JobConf conf = new JobConf(new YarnConfiguration()); JobConf conf = new JobConf(new YarnConfiguration());
// 加载job.xml信息
conf.addResource(new Path(MRJobConfig.JOB_CONF_FILE)); conf.addResource(new Path(MRJobConfig.JOB_CONF_FILE));
MRWebAppUtil.initialize(conf); MRWebAppUtil.initialize(conf);

View File

@ -252,6 +252,7 @@ public void run() {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
protected void handleJobSetup(CommitterJobSetupEvent event) { protected void handleJobSetup(CommitterJobSetupEvent event) {
try { try {
// 主要是创建attempt路径
committer.setupJob(event.getJobContext()); committer.setupJob(event.getJobContext());
context.getEventHandler().handle( context.getEventHandler().handle(
new JobSetupCompletedEvent(event.getJobID())); new JobSetupCompletedEvent(event.getJobID()));

View File

@ -1455,6 +1455,7 @@ public JobStateInternal transition(JobImpl job, JobEvent event) {
} }
try { try {
// 初始化token等信息
setup(job); setup(job);
job.fs = job.getFileSystem(job.conf); job.fs = job.getFileSystem(job.conf);