开发者社区 问答 正文

Hadoop中createAndSubmitJob()的源代码和过程分析以及实现了什么功能?

Hadoop中createAndSubmitJob()的源代码和过程分析以及实现了什么功能?

展开
收起
游客yzrzs5mf6j7yy 2021-12-06 06:26:23 282 分享 版权
1 条回答
写回答
取消 提交回答
  • public Job createAndSubmitJob() throws Exception    {
    
        Job    job = null;
    
        try    {
    
          synchronized(this)    {
    
               metaFolder = createMetaFolderPath();
    
            jobFS    = metaFolder.getFileSystem(getConf());
    
            job =    createJob();
    
    }
    
          if    (!inputOptions.shouldUseDiff()) {
    
               createInputFileListing(job);
    
    }
    
             job.submit();
    
             submitted = true;
    
        } finally    {
    
          if    (!submitted) {
    
               cleanup();}
    
        return    job;
    
    

    }

    2021-12-06 06:27:07
    赞同 展开评论