Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.ProgramDriver


  /**
   * @param args
   * @throws Throwable
   */
  public static void main(String[] args) throws Throwable {
    ProgramDriver pgd = new ProgramDriver();
    pgd.addClass(RowCounter.NAME, RowCounter.class,
      "Count rows in HBase table");
    pgd.driver(args);
  }
View Full Code Here


  private static final DecimalFormat formatter = new DecimalFormat("###.##%");

  public static void main(String argv[]){
    int exitCode = -1;
    ProgramDriver pgd = new ProgramDriver();
    try {
      pgd.addClass("wordcount", WordCount.class,
          "A map/reduce program that counts the words in the input files.");
      pgd.addClass("mapredwordcount", MapredWordCount.class,
          "A map/reduce program that counts the words in the input files"
         + " using the mapred apis.");
      pgd.addClass("wordcountmrrtest", WordCountMRRTest.class,
          "A map/reduce program that counts the words in the input files."
          + " Map splits on spaces. First reduce splits on \".\"");
      pgd.addClass("randomwriter", RandomWriter.class,
          "A map/reduce program that writes 10GB of random data per node.");
      pgd.addClass("randomtextwriter", RandomTextWriter.class,
      "A map/reduce program that writes 10GB of random textual data per node.");
      pgd.addClass("sort", Sort.class,
          "A map/reduce program that sorts the data written by the random"
          + " writer.");
      pgd.addClass("secondarysort", SecondarySort.class,
          "An example defining a secondary sort to the reduce.");
      pgd.addClass("join", Join.class,
          "A job that effects a join over sorted, equally partitioned"
          + " datasets");
      pgd.addClass("teragen", TeraGen.class,
          "Generate data for the terasort");
      pgd.addClass("terasort", TeraSort.class,
          "Run the terasort");
      pgd.addClass("teravalidate", TeraValidate.class,
          "Checking results of terasort");
      pgd.addClass("groupbyorderbymrrtest", GroupByOrderByMRRTest.class,
          "A map-reduce-reduce program that does groupby-order by. Takes input"
          + " containing employee_name department name per line of input"
          + " and generates count of employees per department and"
          + " sorted on employee count");
      pgd.addClass("mrrsleep", MRRSleepJob.class,
          "MRR Sleep Job");
      pgd.addClass("orderedwordcount", OrderedWordCount.class,
          "Word Count with words sorted on frequency");
      pgd.addClass("filterLinesByWord", FilterLinesByWord.class,
          "Filters lines by the specified word using broadcast edge");
      pgd.addClass("filterLinesByWordOneToOne", FilterLinesByWordOneToOne.class,
          "Filters lines by the specified word using OneToOne edge");
      exitCode = pgd.run(argv);
    }
    catch(Throwable e){
      e.printStackTrace();
    }
View Full Code Here

*/
public class HCatTestDriver {
 
  public static void main(String argv[]){
    int exitCode = -1;
    ProgramDriver pgd = new ProgramDriver();
    try {
      pgd.addClass("typedatacheck", TypeDataCheck.class,
                   "A map/reduce program that checks the type of each field and" +
                   " outputs the entire table (to test hcat).");
      pgd.addClass("sumnumbers", SumNumbers.class,
      "A map/reduce program that performs a group by on the first column and a " +
      "SUM operation on the other columns of the \"numbers\" table.");
      pgd.addClass("storenumbers", StoreNumbers.class, "A map/reduce program that " +
          "reads from the \"numbers\" table and adds 10 to each fields and writes " +
              "to the \"numbers_partitioned\" table into the datestamp=20100101 " +
              "partition OR the \"numbers_empty_initially\" table based on a " +
              "cmdline arg");
      pgd.addClass("storecomplex", StoreComplex.class, "A map/reduce program that " +
              "reads from the \"complex\" table and stores as-is into the " +
              "\"complex_empty_initially\" table.");
      pgd.addClass("storedemo", StoreDemo.class, "demo prog.");
      pgd.driver(argv);
     
      // Success
      exitCode = 0;
    }
    catch(Throwable e){
View Full Code Here

*/
public class ExampleDriver {
 
  public static void main(String argv[]){
    int exitCode = -1;
    ProgramDriver pgd = new ProgramDriver();
    try {
      pgd.addClass("wordcount", WordCount.class,
                   "A map/reduce program that counts the words in the input files.");
      pgd.addClass("aggregatewordcount", AggregateWordCount.class,
                   "An Aggregate based map/reduce program that counts the words in the input files.");
      pgd.addClass("aggregatewordhist", AggregateWordHistogram.class,
                   "An Aggregate based map/reduce program that computes the histogram of the words in the input files.");
      pgd.addClass("grep", Grep.class,
                   "A map/reduce program that counts the matches of a regex in the input.");
      pgd.addClass("randomwriter", RandomWriter.class,
                   "A map/reduce program that writes 10GB of random data per node.");
      pgd.addClass("randomtextwriter", RandomTextWriter.class,
      "A map/reduce program that writes 10GB of random textual data per node.");
      pgd.addClass("sort", Sort.class, "A map/reduce program that sorts the data written by the random writer.");
      pgd.addClass("pi", PiEstimator.class, "A map/reduce program that estimates Pi using monte-carlo method.");
      pgd.addClass("pentomino", DistributedPentomino.class,
      "A map/reduce tile laying program to find solutions to pentomino problems.");
      pgd.addClass("sudoku", Sudoku.class, "A sudoku solver.");
      pgd.addClass("sleep", SleepJob.class, "A job that sleeps at each map and reduce task.");
      pgd.addClass("join", Join.class, "A job that effects a join over sorted, equally partitioned datasets");
      pgd.addClass("multifilewc", MultiFileWordCount.class, "A job that counts words from several files.");
      pgd.driver(argv);
     
      // Success
      exitCode = 0;
    }
    catch(Throwable e){
View Full Code Here

public class HdfsTestDriver {

  private ProgramDriver pgd;

  public HdfsTestDriver() {
    this(new ProgramDriver());
  }
View Full Code Here

  /**
   * @param args
   * @throws Throwable
   */
  public static void main(String[] args) throws Throwable {
    ProgramDriver pgd = new ProgramDriver();
    pgd.addClass(RowCounter.NAME, RowCounter.class,
      "Count rows in HBase table");
    pgd.addClass(CellCounter.NAME, CellCounter.class,
      "Count cells in HBase table");
    pgd.addClass(Export.NAME, Export.class, "Write table data to HDFS.");
    pgd.addClass(Import.NAME, Import.class, "Import data written by Export.");
    pgd.addClass(ImportTsv.NAME, ImportTsv.class, "Import data in TSV format.");
    pgd.addClass(LoadIncrementalHFiles.NAME, LoadIncrementalHFiles.class,
                 "Complete a bulk data load.");
    pgd.addClass(CopyTable.NAME, CopyTable.class,
        "Export a table from local cluster to peer cluster");
    pgd.addClass(VerifyReplication.NAME, VerifyReplication.class, "Compare" +
        " the data from tables in two different clusters. WARNING: It" +
        " doesn't work for incrementColumnValues'd cells since the" +
        " timestamp is changed after being appended to the log.");
    ProgramDriver.class.getMethod("driver", new Class [] {String[].class}).
      invoke(pgd, new Object[]{args});
View Full Code Here

  private static final DecimalFormat formatter = new DecimalFormat("###.##%");

  public static void main(String argv[]){
    int exitCode = -1;
    ProgramDriver pgd = new ProgramDriver();
    try {
      pgd.addClass("wordcount", WordCount.class,
          "A map/reduce program that counts the words in the input files.");
      pgd.addClass("mapredwordcount", MapredWordCount.class,
          "A map/reduce program that counts the words in the input files"
         + " using the mapred apis.");
      pgd.addClass("randomwriter", RandomWriter.class,
          "A map/reduce program that writes 10GB of random data per node.");
      pgd.addClass("randomtextwriter", RandomTextWriter.class,
      "A map/reduce program that writes 10GB of random textual data per node.");
      pgd.addClass("sort", Sort.class,
          "A map/reduce program that sorts the data written by the random"
          + " writer.");
      pgd.addClass("secondarysort", SecondarySort.class,
          "An example defining a secondary sort to the reduce.");
      pgd.addClass("join", Join.class,
          "A job that effects a join over sorted, equally partitioned"
          + " datasets");
      pgd.addClass("teragen", TeraGen.class,
          "Generate data for the terasort");
      pgd.addClass("terasort", TeraSort.class,
          "Run the terasort");
      pgd.addClass("teravalidate", TeraValidate.class,
          "Checking results of terasort");
      pgd.addClass("groupbyorderbymrrtest", GroupByOrderByMRRTest.class,
          "A map-reduce-reduce program that does groupby-order by. Takes input"
          + " containing employee_name department name per line of input"
          + " and generates count of employees per department and"
          + " sorted on employee count");
      pgd.addClass("mrrsleep", MRRSleepJob.class,
          "MRR Sleep Job");
      pgd.addClass("orderedwordcount", OrderedWordCount.class,
          "Word Count with words sorted on frequency");
      pgd.addClass("unionexample", UnionExample.class,
          "Union example");
      pgd.addClass("filterLinesByWord", FilterLinesByWord.class,
          "Filters lines by the specified word using broadcast edge");
      pgd.addClass("filterLinesByWordOneToOne", FilterLinesByWordOneToOne.class,
          "Filters lines by the specified word using OneToOne edge");
      exitCode = pgd.run(argv);
    }
    catch(Throwable e){
      e.printStackTrace();
    }
View Full Code Here

   * A description of the test program for running all the tests using jar file
   * @date April 2006
   */
   
    public static void main(String argv[]){
  ProgramDriver pgd = new ProgramDriver();
  try {
      pgd.addClass("mapredtest", TestMapRed.class, "A map/reduce test check.");
      pgd.addClass("clustertestdfs", ClusterTestDFS.class, "A pseudo distributed test for DFS.");
      pgd.addClass("testfilesystem", TestFileSystem.class, "A test for FileSystem read/write.");
      pgd.addClass("testsequencefile", TestSequenceFile.class, "A test for flat files of binary key value pairs.");
      pgd.addClass("testsetfile", TestSetFile.class, "A test for flat files of binary key/value pairs.");
      pgd.addClass("testarrayfile", TestArrayFile.class, "A test for flat files of binary key/value pairs.");
      pgd.addClass("testrpc", TestRPC.class, "A test for rpc.");
      pgd.addClass("testipc", TestIPC.class, "A test for ipc.");
      pgd.addClass("testsequencefileinputformat", TestSequenceFileInputFormat.class, "A test for sequence file input format.");
      pgd.addClass("testtextinputformat", TestTextInputFormat.class, "A test for text input format.");
      pgd.addClass("TestDFSIO", TestDFSIO.class, "Distributed i/o benchmark.");
      pgd.addClass("DFSCIOTest", DFSCIOTest.class, "Distributed i/o benchmark of libhdfs.");
      pgd.addClass("DistributedFSCheck", DistributedFSCheck.class, "Distributed checkup of the file system consistency.");
      pgd.driver(argv);
  }
  catch(Throwable e){
      e.printStackTrace();
  }
    }
View Full Code Here

* @author Owen O'Malley
*/
public class ExampleDriver {
 
    public static void main(String argv[]){
        ProgramDriver pgd = new ProgramDriver();
        try {
      pgd.addClass("wordcount", WordCount.class,
       "A map/reduce program that counts the words in the input files.");
      pgd.addClass("grep", Grep.class,
       "A map/reduce program that counts the matches of a regex in the input.");
      pgd.addClass("randomwriter", RandomWriter.class,
                        "A random writer benchmark that writes 10GB per node.");
            pgd.addClass("sort", Sort.class, "A sort benchmark that sorts the data written by the random writer.");
            pgd.addClass("pi", PiBenchmark.class, "A benchmark that estimates Pi using monte-carlo method.");
            pgd.addClass("nnbench", NNBench.class, "A benchmark that stresses the namenode");
            pgd.driver(argv);
  }
  catch(Throwable e){
      e.printStackTrace();
  }
    }
View Full Code Here

*
*/
public class BenchmarkRunner {
 
  public static void main(String argv[]){
    ProgramDriver pgd = new ProgramDriver();
    try {
      pgd.addClass("smallJobsBenchmark", MultiJobRunner.class,
      "A map/reduce benchmark that creates many small jobs");
      pgd.driver(argv);
    }
    catch(Throwable e){
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.util.ProgramDriver

Copyright © 2018 www.massapicom. 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.