本文整理了Java中ml.shifu.guagua.coordinator.zk.ZooKeeperUtils.checkServers()
方法的一些代码示例,展示了ZooKeeperUtils.checkServers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.checkServers()
方法的具体详情如下:
包路径:ml.shifu.guagua.coordinator.zk.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:checkServers
[英]Check zookeeper servers, if one of them is alive, return true;
[中]检查zookeeper服务器,如果其中一个还活着,则返回true;
代码示例来源:origin: ShifuML/guagua
"Zookeeper servers should be provided by '-z' parameter with non-empty value.");
if(ZooKeeperUtils.checkServers(zkServers)) {
conf.set(GuaguaConstants.GUAGUA_ZK_SERVERS, zkServers.trim());
} else {
代码示例来源:origin: ml.shifu/guagua-yarn
"Zookeeper servers should be provided by '-z' parameter with non-empty value.");
if(ZooKeeperUtils.checkServers(zkServers)) {
conf.set(GuaguaConstants.GUAGUA_ZK_SERVERS, zkServers.trim());
} else {
代码示例来源:origin: ml.shifu/guagua-mapreduce
"Zookeeper servers should be provided by '-z' parameter with non-empty value.");
if(ZooKeeperUtils.checkServers(zkServers)) {
conf.set(GuaguaConstants.GUAGUA_ZK_SERVERS, zkServers.trim());
} else {
代码示例来源:origin: ShifuML/guagua
"Zookeeper servers should be provided by '-z' parameter with non-empty value.");
if(ZooKeeperUtils.checkServers(zkServers)) {
conf.set(GuaguaConstants.GUAGUA_ZK_SERVERS, zkServers.trim());
} else {
代码示例来源:origin: ml.shifu/guagua-mapreduce
@Override
public void preApplication(WorkerContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.sleepTime = NumberFormatUtils.getLong(
context.getProps().getProperty(GuaguaConstants.GUAGUA_COORDINATOR_SLEEP_UNIT), WAIT_SLOT_MILLS);
代码示例来源:origin: ShifuML/guagua
@Override
public void preApplication(WorkerContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.sleepTime = NumberFormatUtils.getLong(
context.getProps().getProperty(GuaguaConstants.GUAGUA_COORDINATOR_SLEEP_UNIT), WAIT_SLOT_MILLS);
代码示例来源:origin: ShifuML/guagua
@Override
public void preApplication(WorkerContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.sleepTime = NumberFormatUtils.getLong(
context.getProps().getProperty(GuaguaConstants.GUAGUA_COORDINATOR_SLEEP_UNIT), WAIT_SLOT_MILLS);
代码示例来源:origin: ml.shifu/guagua-yarn
@Override
public void preApplication(WorkerContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.sleepTime = NumberFormatUtils.getLong(
context.getProps().getProperty(GuaguaConstants.GUAGUA_COORDINATOR_SLEEP_UNIT), WAIT_SLOT_MILLS);
代码示例来源:origin: ml.shifu/guagua-mapreduce
@Override
public void preApplication(MasterContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.isNeedStartZookeeper = true;
if(fileSystem == null) {
代码示例来源:origin: ShifuML/guagua
@Override
public void preApplication(MasterContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.isNeedStartZookeeper = true;
if(fileSystem == null) {
代码示例来源:origin: ml.shifu/guagua-yarn
@Override
public void preApplication(MasterContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.isNeedStartZookeeper = true;
if(fileSystem == null) {
代码示例来源:origin: ShifuML/guagua
@Override
public void preApplication(MasterContext<MASTER_RESULT, WORKER_RESULT> context) {
String zkServers = context.getProps().getProperty(GuaguaConstants.GUAGUA_ZK_SERVERS);
if(zkServers == null || zkServers.length() == 0 || !ZooKeeperUtils.checkServers(zkServers)) {
this.isNeedStartZookeeper = true;
if(fileSystem == null) {
内容来源于网络,如有侵权,请联系作者删除!