Example usage for org.apache.mahout.common HadoopUtil prepareJob

List of usage examples for org.apache.mahout.common HadoopUtil prepareJob

Introduction

In this page you can find the example usage for org.apache.mahout.common HadoopUtil prepareJob.

Prototype

public static Job prepareJob(Path inputPath, Path outputPath, Class<? extends InputFormat> inputFormat,
        Class<? extends Mapper> mapper, Class<? extends Writable> mapperKey,
        Class<? extends Writable> mapperValue, Class<? extends OutputFormat> outputFormat, Configuration conf)
        throws IOException 

Source Link

Document

Create a map-only Hadoop Job out of the passed in parameters.

Usage

From source file:my.mahout.AbstractJob.java

License:Apache License

protected Job prepareJob(Path inputPath, Path outputPath, Class<? extends InputFormat> inputFormat,
        Class<? extends Mapper> mapper, Class<? extends Writable> mapperKey,
        Class<? extends Writable> mapperValue, Class<? extends OutputFormat> outputFormat, String jobname)
        throws IOException {

    Job job = HadoopUtil.prepareJob(inputPath, outputPath, inputFormat, mapper, mapperKey, mapperValue,
            outputFormat, getConf());/*from www. j  av a 2  s.co m*/

    String name = jobname != null ? jobname
            : HadoopUtil.getCustomJobName(getClass().getSimpleName(), job, mapper, Reducer.class);

    job.setJobName(name);
    return job;

}