Class MapReduceUtils
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.util.hadoop.MapReduceUtils
-
public final class MapReduceUtils extends Object
This class contains utility method to easily manipulate the new Hadoop MapReduce API.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsubmitAndWaitForJob(org.apache.hadoop.mapreduce.Job job, String jobDescription, int waitTimeInMillis, TaskStatus status, String counterGroup)Wait the completion of a job.static voidwaitForCompletion(org.apache.hadoop.mapreduce.Job job, int maxTry)Wait for job completion.
-
-
-
Method Detail
-
submitAndWaitForJob
public static void submitAndWaitForJob(org.apache.hadoop.mapreduce.Job job, String jobDescription, int waitTimeInMillis, TaskStatus status, String counterGroup) throws EoulsanExceptionWait the completion of a job.- Parameters:
job- the job to submitjobDescription- the description of the jobwaitTimeInMillis- waiting time between 2 checks of the completion of jobsstatus- step statuscounterGroup- group of the counter to log- Throws:
EoulsanException- if the job fail or if an exception occurs while submitting or waiting the end of the job
-
waitForCompletion
public static void waitForCompletion(org.apache.hadoop.mapreduce.Job job, int maxTry) throws IOExceptionWait for job completion.- Parameters:
job- job to submitmaxTry- number of try to connect to JobTracker before throwing an exception- Throws:
IOException- thrown if the communication with the JobTracker is lost
-
-