List of usage examples for org.apache.hadoop.mapreduce.lib.jobcontrol JobControl getRunningJobList
public List<ControlledJob> getRunningJobList()
From source file:ml.shifu.guagua.mapreduce.GuaguaMapReduceClient.java
License:Apache License
/** * Compute the progress of the current job submitted through the JobControl object jc to the JobClient jobClient * /*ww w . j a v a 2 s.co m*/ * @param jc * The JobControl object that has been submitted * @param jobClient * The JobClient to which it has been submitted * @return The progress as a percentage in double format * @throws IOException * In case any IOException connecting to JobTracker. */ protected double calculateProgress(JobControl jc, JobClient jobClient) throws IOException { double prog = 0.0; prog += jc.getSuccessfulJobList().size(); List<ControlledJob> runnJobs = jc.getRunningJobList(); for (ControlledJob cjob : runnJobs) { prog += progressOfRunningJob(cjob, jobClient); } return prog; }