本文整理了Java中ml.shifu.guagua.coordinator.zk.ZooKeeperUtils.startEmbedZooKeeper()
方法的一些代码示例,展示了ZooKeeperUtils.startEmbedZooKeeper()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.startEmbedZooKeeper()
方法的具体详情如下:
包路径:ml.shifu.guagua.coordinator.zk.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:startEmbedZooKeeper
[英]Start embed zookeeper server in a daemon thread.
[中]在守护进程线程中启动嵌入zookeeper服务器。
代码示例来源:origin: ml.shifu/guagua-mapreduce
/**
* Start zookeeper server in thread of master node.
*/
private String startZookeeperServer(String localHostName) {
int embedZkClientPort = 0;
try {
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
}
// 2. check if it is started.
ZooKeeperUtils.checkIfEmbedZooKeeperStarted(embedZkClientPort);
return localHostName + ":" + embedZkClientPort;
}
代码示例来源:origin: ShifuML/guagua
/**
* Start zookeeper server in thread of master node.
*/
private String startZookeeperServer(String localHostName) {
int embedZkClientPort = 0;
try {
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
}
// 2. check if it is started.
ZooKeeperUtils.checkIfEmbedZooKeeperStarted(embedZkClientPort);
return localHostName + ":" + embedZkClientPort;
}
代码示例来源:origin: ml.shifu/guagua-yarn
/**
* Start zookeeper server in thread of master node.
*/
private String startZookeeperServer(String localHostName) {
int embedZkClientPort = 0;
try {
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
}
// 2. check if it is started.
ZooKeeperUtils.checkIfEmbedZooKeeperStarted(embedZkClientPort);
return localHostName + ":" + embedZkClientPort;
}
代码示例来源:origin: ShifuML/guagua
/**
* Start zookeeper server in thread of master node.
*/
private String startZookeeperServer(String localHostName) {
int embedZkClientPort = 0;
try {
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
}
// 2. check if it is started.
ZooKeeperUtils.checkIfEmbedZooKeeperStarted(embedZkClientPort);
return localHostName + ":" + embedZkClientPort;
}
代码示例来源:origin: ShifuML/guagua
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
代码示例来源:origin: ml.shifu/guagua-yarn
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
代码示例来源:origin: ml.shifu/guagua-mapreduce
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
代码示例来源:origin: ShifuML/guagua
embedZkClientPort = ZooKeeperUtils.startEmbedZooKeeper();
} catch (IOException e) {
throw new RuntimeException(e);
内容来源于网络,如有侵权,请联系作者删除!