public static List<FakeInstance> addFakeDataInstancesToAutoJoinHelixCluster( String helixClusterName, String zkServer, int numInstances, int base) throws Exception { List<FakeInstance> ret = new ArrayList<FakeInstance>(); for (int i = base; i < numInstances + base; ++i) { final String instanceId = "Server_localhost_" + i; FakeInstance fakeInstance = new FakeInstance(helixClusterName, instanceId, zkServer); fakeInstance.start(); ret.add(fakeInstance); } return ret; }
public static FakeInstance startDefault(String instanceId) throws Exception { String zkPath = "localhost:2181"; String helixClusterName = "testMirrorMaker"; FakeInstance fakeInstance = new FakeInstance(helixClusterName, instanceId, zkPath); fakeInstance.start(); final ShutdownHook shutdownHook = new ShutdownHook(fakeInstance); Runtime.getRuntime().addShutdownHook(shutdownHook); return fakeInstance; }
LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start();
LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start();
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(5000);
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(5000);
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(3000);
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(2000);
public static List<FakeInstance> addFakeDataInstancesToAutoJoinHelixCluster( String helixClusterName, String zkServer, int numInstances, int base) throws Exception { List<FakeInstance> ret = new ArrayList<FakeInstance>(); for (int i = base; i < numInstances + base; ++i) { final String instanceId = "Server_localhost_" + i; FakeInstance fakeInstance = new FakeInstance(helixClusterName, instanceId, zkServer); fakeInstance.start(); ret.add(fakeInstance); } return ret; }
public static FakeInstance startDefault(String instanceId) throws Exception { String zkPath = "localhost:2181"; String helixClusterName = "testMirrorMaker"; FakeInstance fakeInstance = new FakeInstance(helixClusterName, instanceId, zkPath); fakeInstance.start(); final ShutdownHook shutdownHook = new ShutdownHook(fakeInstance); Runtime.getRuntime().addShutdownHook(shutdownHook); return fakeInstance; }
LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start();
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(6000);
} else { LOGGER.info("Trying to bring up: " + fakeInstances.get(i / 2).getInstanceId()); fakeInstances.get(i / 2).start(); totalInstancesSize++; for (int i = 0; i < fakeInstances.size() - 1; ++i) { LOGGER.info("Trying to bring up: " + fakeInstances.get(i).getInstanceId()); fakeInstances.get(i).start(); totalInstancesSize++; Thread.sleep(6000);