Class MapReduceUtils
java.lang.Object
fr.ens.biologie.genomique.eoulsan.util.hadoop.MapReduceUtils
This class contains utility method to easily manipulate the new Hadoop MapReduce API.
- Since:
- 1.0
- Author:
- Laurent Jourdren
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
submitAndWaitForJob
public static void submitAndWaitForJob(org.apache.hadoop.mapreduce.Job job, String jobDescription, int waitTimeInMillis, TaskStatus status, String counterGroup) throws EoulsanException Wait 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 IOException Wait 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
-