org.apache.hadoop.mapred.jobcontrol.Job.submit()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(258)

本文整理了Java中org.apache.hadoop.mapred.jobcontrol.Job.submit()方法的一些代码示例,展示了Job.submit()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.submit()方法的具体详情如下:
包路径:org.apache.hadoop.mapred.jobcontrol.Job
类名称:Job
方法名:submit

Job.submit介绍

[英]Submit this job to mapred. The state becomes RUNNING if submission is successful, FAILED otherwise.
[中]将此作业提交给mapred。如果提交成功,则状态变为运行,否则状态变为失败。

代码示例

代码示例来源:origin: com.facebook.hadoop/hadoop-core

synchronized private void startReadyJobs() {
 Map<String, Job> oldJobs = null;
 oldJobs = this.readyJobs;
 this.readyJobs = new Hashtable<String, Job>();
   
 for (Job nextJob : oldJobs.values()) {
  //System.out.println("Job to submit to Hadoop: " + nextJob.getJobName());
  nextJob.submit();
  //System.out.println("Hadoop ID: " + nextJob.getMapredJobID());
  this.addToQueue(nextJob);
 }    
}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

synchronized private void startReadyJobs() {
 Map<String, Job> oldJobs = null;
 oldJobs = this.readyJobs;
 this.readyJobs = new Hashtable<String, Job>();
   
 for (Job nextJob : oldJobs.values()) {
  //System.out.println("Job to submit to Hadoop: " + nextJob.getJobName());
  nextJob.submit();
  //System.out.println("Hadoop ID: " + nextJob.getMapredJobID());
  this.addToQueue(nextJob);
 }    
}

相关文章