Search in sources :

Example 1 with JobControl

use of org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl in project hadoop by apache.

the class ValueAggregatorJob method createValueAggregatorJobs.

public static JobControl createValueAggregatorJobs(String[] args, Class<? extends ValueAggregatorDescriptor>[] descriptors) throws IOException {
    JobControl theControl = new JobControl("ValueAggregatorJobs");
    ArrayList<ControlledJob> dependingJobs = new ArrayList<ControlledJob>();
    Configuration conf = new Configuration();
    if (descriptors != null) {
        conf = setAggregatorDescriptors(descriptors);
    }
    Job job = createValueAggregatorJob(conf, args);
    ControlledJob cjob = new ControlledJob(job, dependingJobs);
    theControl.addJob(cjob);
    return theControl;
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) ArrayList(java.util.ArrayList) JobControl(org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl) ControlledJob(org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob) ControlledJob(org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob) Job(org.apache.hadoop.mapreduce.Job)

Aggregations

ArrayList (java.util.ArrayList)1 Configuration (org.apache.hadoop.conf.Configuration)1 Job (org.apache.hadoop.mapreduce.Job)1 ControlledJob (org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob)1 JobControl (org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl)1