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; }
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; }