예제 #1
0
 @SuppressWarnings({"ProhibitedExceptionDeclared"})
 @Override
 protected void setUp() throws Exception {
   super.setUp();
   farmer = new MockClusterFarmerImpl();
   farmer.initForMockUse(CLUSTER_SIZE, "internal", "external", true, 500);
   master = new ClusterRoleInfo(MASTER);
   master.setRoleSize(1, 1);
   master.setLinks(MasterLinks);
   worker = new ClusterRoleInfo(WORKER);
   worker.setRoleSize(1, 100);
   master.setLinks(MasterLinks);
   addTestRoles();
   controller = new DynamicSmartFrogClusterController(farmer);
 }
예제 #2
0
 private void addTestRoles() {
   farmer.addRole(MASTER, master);
   farmer.addRole(WORKER, worker);
 }