Example usage for org.apache.hadoop.util ToolRunner run

List of usage examples for org.apache.hadoop.util ToolRunner run

Introduction

In this page you can find the example usage for org.apache.hadoop.util ToolRunner run.

Prototype

public static int run(Configuration conf, Tool tool, String[] args) throws Exception 

Source Link

Document

Runs the given Tool by Tool#run(String[]) , after parsing with the given generic arguments.

Usage

From source file:cn.lhfei.hbase.ch04.SampleUploader.java

License:Apache License

public static void main(String[] args) throws Exception {
    //      int status = ToolRunner.run(HBaseConfiguration.create(), new SampleUploader(), args);
    args = new String[] { "/user/lhfei/test-data.txt", "jsontable" };
    int status = ToolRunner.run(AppConfig.getConfiguration(), new SampleUploader(), args);

    System.exit(status);//w  ww.j a  v  a 2 s.  c  o  m
}

From source file:cn.macthink.hadoop.tdt.clustering.canopy.CanopyClustering.java

License:Apache License

public static void main(String[] args) throws Exception {
    if (args.length > 0) {
        log.info("Running with only user-supplied arguments");
        ToolRunner.run(new Configuration(), new CanopyClustering(), args);
    } else {/*from www .  j a  va  2s  .c o  m*/
        log.info("Running with default arguments");
        Path output = new Path("output");
        HadoopUtil.delete(new Configuration(), output);
        run(new Path("testdata"), output, new EuclideanDistanceMeasure(), 80, 55);
    }
}

From source file:co.nubetech.hiho.dedup.DedupJob.java

License:Apache License

public static void main(String[] args) throws Exception {
    DedupJob job = new DedupJob();
    int res = ToolRunner.run(new Configuration(), job, args);
    System.exit(res);/*from  w  w  w. ja  v  a2  s.c  o m*/
}

From source file:co.nubetech.hiho.dedup.TestDedupJob.java

License:Apache License

public DedupJob runDedupJob(String[] args) throws Exception {
    DedupJob job = new DedupJob();
    int res = ToolRunner.run(createJobConf(), job, args);
    assertEquals(0, res);//from   w ww .  j a  v  a 2 s.  c om
    return job;
}

From source file:co.nubetech.hiho.job.DBQueryInputJob.java

License:Apache License

public static void main(String[] args) throws Exception {
    // setUp();/*from   ww w  .j av  a2  s .c o m*/
    DBQueryInputJob job = new DBQueryInputJob();
    // ArrayList params = new ArrayList();
    // params.add(false);
    // job.setParams(params);
    int res = ToolRunner.run(new Configuration(), job, args);
    System.exit(res);
}

From source file:co.nubetech.hiho.job.ExportDelimitedToDB.java

License:Apache License

public static void main(String[] args) throws Exception {

    int res = ToolRunner.run(new Configuration(), new ExportDelimitedToDB(), args);
    System.exit(res);/*from  www.  j av  a 2  s  . c o  m*/
}

From source file:co.nubetech.hiho.job.ExportToDB.java

License:Apache License

public static void main(String[] args) throws Exception {
    int res = ToolRunner.run(new Configuration(), new ExportToDB(), args);
    System.exit(res);//from  ww  w . jav a 2s. c  o  m
}

From source file:co.nubetech.hiho.job.ExportToFTPServer.java

License:Apache License

public static void main(String[] args) throws Exception {
    int res = ToolRunner.run(new Configuration(), new ExportToFTPServer(), args);
    System.exit(res);//from ww  w .  j a v  a 2  s.c  o m
}

From source file:co.nubetech.hiho.job.ExportToMySQLDB.java

License:Apache License

public static void main(String[] args) throws Exception {
    int res = ToolRunner.run(new Configuration(), new ExportToMySQLDB(), args);
    System.exit(res);//from  w  w w  .j a v  a2  s .  c o m
}

From source file:co.nubetech.hiho.job.ExportToOracleDb.java

License:Apache License

public static void main(String[] args) throws Exception {
    int res = ToolRunner.run(new Configuration(), new ExportToOracleDb(), args);
    System.exit(res);// w  ww  .j av a 2s  . co  m
}