Examples of BSPJobClient


Examples of org.apache.hama.bsp.BSPJobClient

    FileOutputFormat.setOutputPath(bsp, TMP_OUTPUT);

    LOG.info("Client configuration start ..");

    HamaConfiguration clientConf = controller.getConfiguration();
    BSPJobClient jobClient = new BSPJobClient(clientConf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);
    assertNotNull(cluster);
    assertTrue(cluster.getGroomServers() > 0);
    assertTrue(cluster.getMaxTasks() > 1);
    bsp.setNumBspTask(cluster.getMaxTasks());

    LOG.info("Client conf: "
        + clientConf.get("hadoop.rpc.socket.factory.class.default"));

    RunningJob rJob = jobClient.submitJob(bsp);
    rJob.waitForCompletion();
    LOG.info("finished");
  }
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

        conf.set("out.path", "pagerank/output");
        LOG.info("Set output path to default of pagerank/output!");
      }
    }

    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);
    StringBuilder sb = new StringBuilder();
    for (String peerName : cluster.getActiveGroomNames().values()) {
      conf.set(MASTER_TASK, peerName);
      sb.append(peerName + ";");
    }
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    // Set the job name
    bsp.setJobName("Single Source Shortest Path");
    bsp.setBspClass(ShortestPaths.class);

    // Set the task size as a number of GroomServer
    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);
    StringBuilder sb = new StringBuilder();
    for (String peerName : cluster.getActiveGroomNames().values()) {
      conf.set(MASTER_TASK, peerName);
      sb.append(peerName);
      sb.append(";");
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    BSPJob bsp = new BSPJob(conf, PiEstimator.class);
    // Set the job name
    bsp.setJobName("Pi Estimation Example");
    bsp.setBspClass(MyEstimator.class);

    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);

    if (args.length > 0) {
      bsp.setNumBspTask(Integer.parseInt(args[0]));
    } else {
      // Set to maximum
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    // Set the job name
    bsp.setJobName("Serialize Printing");
    bsp.setBspClass(HelloBSP.class);

    // Set the task size as a number of GroomServer
    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(false);
    bsp.setNumBspTask(cluster.getGroomServers());

    FileSystem fileSys = FileSystem.get(conf);
    initTempDir(fileSys);
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    // Set the job name
    bsp.setJobName("Random Communication Benchmark");
    bsp.setBspClass(RandBSP.class);

    // Set the task size as a number of GroomServer
    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(false);
    bsp.setNumBspTask(cluster.getGroomServers());

    long startTime = System.currentTimeMillis();
    bsp.waitForCompletion(true);
    System.out.println("Job Finished in "
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    bsp.setBspClass(RandBSP.class);
    bsp.setInputFormat(NullInputFormat.class);
    bsp.setOutputFormat(NullOutputFormat.class);

    // Set the task size as a number of GroomServer
    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(false);
    bsp.setNumBspTask(cluster.getMaxTasks());

    long startTime = System.currentTimeMillis();
    if (bsp.waitForCompletion(true)) {
      System.out.println("Job Finished in "
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    configuration.setInt("hama.graph.multi.step.partitioning.interval", 30);

    GraphJob bsp = new GraphJob(configuration, PageRank.class);
    bsp.setInputPath(new Path(INPUT));
    bsp.setOutputPath(new Path(OUTPUT));
    BSPJobClient jobClient = new BSPJobClient(configuration);
    configuration.setInt(Constants.ZOOKEEPER_SESSION_TIMEOUT, 6000);
    ClusterStatus cluster = jobClient.getClusterStatus(false);
    assertEquals(this.numOfGroom, cluster.getGroomServers());
    bsp.setNumBspTask(2);
    LOG.info("Client finishes execution job.");
    bsp.setJobName("Pagerank");
    bsp.setVertexClass(PageRank.PageRankVertex.class);
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    bsp.setOutputKeyClass(Text.class);
    bsp.setOutputValueClass(DoubleWritable.class);
    bsp.setOutputFormat(TextOutputFormat.class);
    FileOutputFormat.setOutputPath(bsp, TMP_OUTPUT);

    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);

    if (args.length > 0) {
      bsp.setNumBspTask(Integer.parseInt(args[0]));
    } else {
      // Set to maximum
View Full Code Here

Examples of org.apache.hama.bsp.BSPJobClient

    bsp.setOutputKeyClass(Text.class);
    bsp.setOutputValueClass(DoubleWritable.class);
    bsp.setOutputFormat(TextOutputFormat.class);
    FileOutputFormat.setOutputPath(bsp, TMP_OUTPUT);

    BSPJobClient jobClient = new BSPJobClient(conf);
    ClusterStatus cluster = jobClient.getClusterStatus(true);

    if (args.length > 0) {
      bsp.setNumBspTask(Integer.parseInt(args[0]));
    } else {
      // Set to maximum
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.