Package com.cloudera.iterativereduce.yarn.avro.generated

Examples of com.cloudera.iterativereduce.yarn.avro.generated.WorkerId


  public static WorkerId createWorkerId(String name) {
    byte[] buff = new byte[32];
    System.arraycopy(name.getBytes(), 0, buff, 0, name.length());

    return new WorkerId(buff);
  }
View Full Code Here


  private Map<WorkerId, StartupConfiguration> getMasterStartupConfiguration(
      Set<ConfigurationTuple> configTuples) {
    Map<WorkerId, StartupConfiguration> startupConfig = new HashMap<WorkerId, StartupConfiguration>();

    for (ConfigurationTuple tuple : configTuples) {
      WorkerId wid = Utils.createWorkerId(tuple.getWorkerId());
      startupConfig.put(wid, tuple.getConfig());
    }

    return startupConfig;
  }
View Full Code Here

    IterativeReduceService masterPrc = SpecificRequestor.getClient(
        IterativeReduceService.class, new NettyTransceiver(masterAddress));

    // Test
    WorkerId workerOne = Utils.createWorkerId("worker1");
    WorkerId workerTwo = Utils.createWorkerId("worker2");
   
    // Startup
    assertStartupConfiguration(masterPrc.startup(workerOne), "/foo/bar", 2, 1, null);
    assertStartupConfiguration(masterPrc.startup(workerTwo), "/foo/bar", 2, 1, null);
   
View Full Code Here

TOP

Related Classes of com.cloudera.iterativereduce.yarn.avro.generated.WorkerId

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.