Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.JobConf.addInputPath()


  }

  public void merge(Path output, Path[] dbs, boolean normalize, boolean filter) throws Exception {
    JobConf job = LinkDb.createMergeJob(getConf(), output, normalize, filter);
    for (int i = 0; i < dbs.length; i++) {
      job.addInputPath(new Path(dbs[i], LinkDb.CURRENT_NAME));     
    }
    JobClient.runJob(job);
    FileSystem fs = FileSystem.get(getConf());
    fs.mkdirs(output);
    fs.rename(job.getOutputPath(), new Path(output, LinkDb.CURRENT_NAME));
View Full Code Here


    }
    theJob.setJobName("ValueAggregatorJob: " + jobName);

    String[] inputDirsSpecs = inputDir.split(",");
    for (int i = 0; i < inputDirsSpecs.length; i++) {
      theJob.addInputPath(new Path(inputDirsSpecs[i]));
    }

    theJob.setInputFormat(theInputFormat);
   
    theJob.setMapperClass(ValueAggregatorMapper.class);
View Full Code Here

    theJob.setJobName("DataMoveJob");

    theJob.setInputPath((Path) indirs.get(0));
    if (indirs.size() > 1) {
      for (int i = 1; i < indirs.size(); i++) {
        theJob.addInputPath((Path) indirs.get(i));
      }
    }
    theJob.setMapperClass(DataCopy.class);
    theJob.setOutputPath(outdir);
    theJob.setOutputKeyClass(Text.class);
View Full Code Here

   * @return
   */
  private JobConf setupJob(){
    JobConf job = new JobConf() ;
   
    job.addInputPath(new Path(context + "/input"));
   
    job.setInputFormat(TextInputFormat.class);
    job.setOutputFormat(TextOutputFormat.class);
   
    job.setInputKeyClass(LongWritable.class);
View Full Code Here

        theJob.setJobName("DataMoveJob");

        theJob.setInputPath((Path) indirs.get(0));
        if (indirs.size() > 1) {
            for (int i = 1; i < indirs.size(); i++) {
                theJob.addInputPath((Path) indirs.get(i));
            }
        }
        theJob.setMapperClass(DataCopy.class);
        theJob.setOutputPath(outdir);
        theJob.setOutputKeyClass(Text.class);
View Full Code Here

   * @return
   */
  private JobConf setupJob(){
    JobConf job = new JobConf() ;
   
    job.addInputPath(new Path(context + "/input"));
   
    job.setInputFormat(TextInputFormat.class);
    job.setOutputFormat(TextOutputFormat.class);
   
    job.setInputKeyClass(LongWritable.class);
View Full Code Here

    FileSystem fs = FileSystem.get(theJob);
    theJob.setJobName("ValueAggregatorJob");

    String[] inputDirsSpecs = inputDir.split(",");
    for (int i = 0; i < inputDirsSpecs.length; i++) {
      theJob.addInputPath(new Path(inputDirsSpecs[i]));
    }

    theJob.setInputFormat(theInputFormat);
   
    theJob.setMapperClass(ValueAggregatorMapper.class);
View Full Code Here

      job.setReducerClass(SleepJob.class);
      job.setOutputFormat(NullOutputFormat.class);
      job.setInputFormat(SequenceFileInputFormat.class);
      job.setSpeculativeExecution(false);
      job.setJobName("Sleep job");
      job.addInputPath(tempPath);
      job.setLong("sleep.job.map.sleep.time", mapSleepTime);
      job.setLong("sleep.job.reduce.sleep.time", reduceSleepTime);
      job.setLong("sleep.job.map.sleep.count", mapSleepCount);
      job.setLong("sleep.job.reduce.sleep.count", reduceSleepCount);
View Full Code Here

   * @return
   */
  private JobConf setupJob(){
    JobConf job = new JobConf() ;
   
    job.addInputPath(new Path(context + "/input"));
   
    job.setInputFormat(TextInputFormat.class);
    job.setOutputFormat(TextOutputFormat.class);
   
    job.setInputKeyClass(LongWritable.class);
View Full Code Here

        theJob.setJobName("DataMoveJob");

        theJob.setInputPath((Path) indirs.get(0));
        if (indirs.size() > 1) {
            for (int i = 1; i < indirs.size(); i++) {
                theJob.addInputPath((Path) indirs.get(i));
            }
        }
        theJob.setMapperClass(DataCopy.class);
        theJob.setOutputPath(outdir);
        theJob.setOutputKeyClass(Text.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.