Examples of OrbConfiguration


Examples of org.goldenorb.conf.OrbConfiguration

 
  private static MiniDFSCluster cluster;
 
  @BeforeClass
  public static void setUp() throws IOException{
    OrbConfiguration orbConf = new OrbConfiguration(true);
    cluster = new MiniDFSCluster(orbConf, 3, true, null);
  }
View Full Code Here

Examples of org.goldenorb.conf.OrbConfiguration

    ZookeeperUtils.tryToCreateNode(zk, "/GoldenOrb/OrbCluster");   
    CountDownLatch joinLeaderGroup = new CountDownLatch(NUM_OF_MEMBERS); //everyone join?
    CountDownLatch exit = new CountDownLatch(NUM_OF_MEMBERS); //everyone ready to exit?
    CountDownLatch jobCreated = new CountDownLatch(1);
    CountDownLatch newLeader = new CountDownLatch(1);
    OrbConfiguration orbConf = new OrbConfiguration();
    orbConf.setOrbClusterName("OrbCluster");
    orbConf.setJobHeartbeatTimeout(1000);
    orbConf.setMaximumJobTries(3);
    System.out.println(orbConf.getJobHeartbeatTimeout());
    // Create all of the test Trackers
    for (int i = 0; i < NUM_OF_MEMBERS; i++) {
      TJTracker tracker = new TJTracker(zk, joinLeaderGroup, exit, orbConf, i, "/GoldenOrb/OrbCluster");
      trackers.add(tracker);
      threads.add(new Thread(tracker));
      threads.get(i).start();
    }
    joinLeaderGroup.await();
    orbConf.setOrbZooKeeperQuorum("localhost:21810");
    orbConf.set("fs.default.name", "hdfs://localhost:" + cluster.getNameNodePort());
    orbConf.addFileToDistribute("src/test/resources/distributeTest1.txt");
    orbConf.addFileToDistribute("src/test/resources/HelloWorld.jar");
   
    String path1 = runJob(orbConf);
    String path2 = runJob(orbConf);
    System.out.println(path1+" "+path2);
    new Thread(new HeartbeatUpdater(getJobInProgressPath(path1))).start();
View Full Code Here

Examples of org.goldenorb.conf.OrbConfiguration

    OrbSingleSourceShortestPathJob job =  new OrbSingleSourceShortestPathJob();
    job.startJob(args);
  }

  public void startJob(String[] args) {
    OrbConfiguration orbConf = new OrbConfiguration(true);

    orbConf.setFileInputFormatClass(TextInputFormat.class);
    orbConf.setFileOutputFormatClass(TextOutputFormat.class);
    orbConf.setVertexClass(SingleSourceShortestPathVertex.class);
    orbConf.setMessageClass(PathMessage.class);
    orbConf.setVertexInputFormatClass(SingleSourceShortestPathReader.class);
    orbConf.setVertexOutputFormatClass(SingleSourceShortestPathWriter.class);
    orbConf.setNumberOfMessageHandlers(10);
    orbConf.setNumberOfVertexThreads(10);

    try {
      parseArgs(orbConf, args, ALGORITHM_NAME);   
    } catch (Exception e) {
      printHelpMessage();
View Full Code Here

Examples of org.goldenorb.conf.OrbConfiguration

  private static ZooKeeper ZK;
  private static OrbConfiguration orbConf;

  @BeforeClass
  public static void setUpTest() throws IOException, InterruptedException, OrbZKFailure {
    orbConf = new OrbConfiguration(true);
    orbConf.setOrbZooKeeperQuorum("localhost:21810");
    ZK = ZookeeperUtils.connect(orbConf.getOrbZooKeeperQuorum());
  }
View Full Code Here

Examples of org.goldenorb.conf.OrbConfiguration

*
* @param  String[] args
*/
  public static void main(String[] args) {
    OrbRunner runner = new OrbRunner();
    runner.runJob(new OrbConfiguration(true));
  }
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.