System.exit(1);
}
String redisHost = args[1];
int redisPort = Integer.parseInt(args[2]);
ZkServer server = null;
try {
String baseDir = "/tmp/TaskExecutionDemo/";
final String dataDir = baseDir + "zk/dataDir";
final String logDir = baseDir + "/tmp/logDir";
FileUtils.deleteDirectory(new File(dataDir));
FileUtils.deleteDirectory(new File(logDir));
IDefaultNameSpace defaultNameSpace = new IDefaultNameSpace() {
@Override
public void createDefaultNameSpace(ZkClient zkClient) {
}
};
int zkPort = Integer.parseInt(args[0]);
server = new ZkServer(dataDir, logDir, defaultNameSpace, zkPort);
server.start();
String zkAddr = "localhost:" + zkPort;
String clusterName = TaskCluster.DEFAULT_CLUSTER_NAME;
TaskCluster taskCluster = new TaskCluster(zkAddr, clusterName);