use of org.I0Itec.zkclient.IDefaultNameSpace in project helix by apache.
the class Quickstart method startZookeeper.
public static void startZookeeper() {
echo("STARTING Zookeeper at " + ZK_ADDRESS);
IDefaultNameSpace defaultNameSpace = new IDefaultNameSpace() {
@Override
public void createDefaultNameSpace(ZkClient zkClient) {
}
};
new File("/tmp/helix-quickstart").mkdirs();
// start zookeeper
ZkServer server = new ZkServer("/tmp/helix-quickstart/dataDir", "/tmp/helix-quickstart/logDir", defaultNameSpace, 2199);
server.start();
}
use of org.I0Itec.zkclient.IDefaultNameSpace in project databus by linkedin.
the class TestUtil method startZkServer.
public static ZkServer startZkServer(String zkTestDataRootDir, int machineId, int port, int tickTime) throws IOException {
File zkTestDataRootDirFile = new File(zkTestDataRootDir);
zkTestDataRootDirFile.mkdirs();
String dataPath = zkTestDataRootDir + "/" + machineId + "/" + port + "/data";
String logPath = zkTestDataRootDir + "/" + machineId + "/" + port + "/log";
FileUtils.deleteDirectory(new File(dataPath));
FileUtils.deleteDirectory(new File(logPath));
IDefaultNameSpace mockDefaultNameSpace = new IDefaultNameSpace() {
@Override
public void createDefaultNameSpace(ZkClient zkClient) {
}
};
ZkServer zkServer = new ZkServer(dataPath, logPath, mockDefaultNameSpace, port, tickTime);
zkServer.start();
return zkServer;
}
Aggregations