Package com.datasalt.pangool.tuplemr

Examples of com.datasalt.pangool.tuplemr.MapOnlyJobBuilder.createJob()


      protected void map(LongWritable key, Text value, Context context) throws IOException ,InterruptedException {
        value.set(value.toString() + "\t" + classify(value.toString()));
        context.write(value, NullWritable.get());
      }
    });
    job.createJob().waitForCompletion(true);
   
    return 1;
  }

  public static void main(String[] args) throws Exception {
View Full Code Here


    delete(output);
   
    MapOnlyJobBuilder b = new MapOnlyJobBuilder(conf);
    b.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
    b.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class), new GrepHandler(regex));
    b.createJob().waitForCompletion(true);
   
    return 0;
  }

  public Grep() {
View Full Code Here

      protected void map(LongWritable key, Text value, Context context) throws IOException ,InterruptedException {
        value.set(value.toString() + "\t" + classify(value.toString()));
        context.write(value, NullWritable.get());
      }
    });
    job.createJob().waitForCompletion(true);
   
    return 1;
  }

  public static void main(String[] args) throws Exception {
View Full Code Here

   
    MapOnlyJobBuilder b = new MapOnlyJobBuilder(conf);
    b.setMapper(new GrepHandler(regex));
    b.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
    b.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class));
    b.createJob().waitForCompletion(true);
   
    return 0;
  }

  public Grep() {
View Full Code Here

        context.write(value, NullWritable.get());
      }
    });
    job.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
    job.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class));
    job.createJob().waitForCompletion(true);
   
    return 1;
  }

  public static void main(String[] args) throws Exception {
View Full Code Here

   
    MapOnlyJobBuilder b = new MapOnlyJobBuilder(conf);
    b.setMapper(new GrepHandler(regex));
    b.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
    b.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class));
    b.createJob().waitForCompletion(true);
   
    return 0;
  }

  public Grep() {
View Full Code Here

      protected void map(ITuple key, NullWritable value, Context context) throws IOException, InterruptedException {
        System.out.println(key.toString());
      };
    });
    builder.setOutput(new Path(HCatTupleInputFormat.class + "-out"), new HadoopOutputFormat(NullOutputFormat.class), NullWritable.class, NullWritable.class);
    builder.createJob().waitForCompletion(true);
    return 1;
  }
}
View Full Code Here

    delete(output);
   
    MapOnlyJobBuilder b = new MapOnlyJobBuilder(conf);
    b.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
    b.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class), new GrepHandler(regex));
    Job job = b.createJob();
    try {
      job.waitForCompletion(true);
    } finally {
      b.cleanUpInstanceFiles();
    }
View Full Code Here

    builder.setOutput(new Path(outPath), new HadoopOutputFormat(MongoOutputFormat.class), Text.class,
        BSONObject.class);

    // Finally, build and execute the Pangool Job.
    try {
      builder.createJob().waitForCompletion(true);
    } finally {
      builder.cleanUpInstanceFiles();
    }
   
    // we are not interested in the output folder, so delete it
View Full Code Here

      protected void map(LongWritable key, Text value, Context context) throws IOException ,InterruptedException {
        value.set(value.toString() + "\t" + classify(value.toString()));
        context.write(value, NullWritable.get());
      }
    });
    Job j = job.createJob();
    try {
      j.waitForCompletion(true);
    } finally {
      job.cleanUpInstanceFiles();
    }
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.