/** * @return the mapred ID of this job as assigned by the mapred framework. */ public synchronized String getMapredJobID() { if (super.getMapredJobId() != null) { return super.getMapredJobId().toString(); } return null; }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public synchronized String getMapredJobID() { if (super.getMapredJobId() != null) { return super.getMapredJobId().toString(); } return null; }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public synchronized String getMapredJobID() { if (super.getMapredJobId() != null) { return super.getMapredJobId().toString(); } return null; }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public synchronized String getMapredJobID() { if (super.getMapredJobId() != null) { return super.getMapredJobId().toString(); } return null; }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public JobID getAssignedJobID() { org.apache.hadoop.mapreduce.JobID temp = super.getMapredJobId(); if (temp == null) { return null; } return JobID.downgrade(temp); }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public JobID getAssignedJobID() { org.apache.hadoop.mapreduce.JobID temp = super.getMapredJobId(); if (temp == null) { return null; } return JobID.downgrade(temp); }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public JobID getAssignedJobID() { org.apache.hadoop.mapreduce.JobID temp = super.getMapredJobId(); if (temp == null) { return null; } return JobID.downgrade(temp); }
/** * @return the mapred ID of this job as assigned by the mapred framework. */ public JobID getAssignedJobID() { org.apache.hadoop.mapreduce.JobID temp = super.getMapredJobId(); if (temp == null) { return null; } return JobID.downgrade(temp); }
/** * If stop_on_failure is enabled and any job has failed, it stops other jobs. * @param stop_on_failure whether it's enabled. * @return true if there were failed jobs and stop_on_failure is enabled */ private boolean stopJobsOnFailure(boolean stop_on_failure) throws IOException, InterruptedException { if (jc.getFailedJobs().isEmpty()) return false; if (stop_on_failure) { List<ControlledJob> readyJobsList = jc.getReadyJobsList(); List<ControlledJob> runningJobList = jc.getRunningJobList(); if (readyJobsList.size() > 0 || runningJobList.size() > 0) { log.info("Some job(s) failed. Failing other ready and running jobs as -stop_on_failure is on"); for (ControlledJob job : readyJobsList) { job.failJob("Failing ready job for -stop_on_failure: " + job.getMapredJobId()); } for (ControlledJob job : runningJobList) { job.failJob("Failing running job for -stop_on_failure: " + job.getMapredJobId()); } } return true; } return false; }
@Test(timeout = 30000) public void testControlledJob() throws Exception { LOG.info("Starting testControlledJob"); Configuration conf = createJobConf(); cleanupData(conf); Job job1 = MapReduceTestUtil.createCopyJob(conf, outdir_1, indir); JobControl theControl = createDependencies(conf, job1); while (cjob1.getJobState() != ControlledJob.State.RUNNING) { try { Thread.sleep(100); } catch (InterruptedException e) { break; } } Assert.assertNotNull(cjob1.getMapredJobId()); // wait till all the jobs complete waitTillAllFinished(theControl); assertEquals("Some jobs failed", 0, theControl.getFailedJobList().size()); theControl.stop(); } }