ml.shifu.guagua.coordinator.zk.ZooKeeperUtils.startEmbedZooKeeper()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中ml.shifu.guagua.coordinator.zk.ZooKeeperUtils.startEmbedZooKeeper()方法的一些代码示例,展示了ZooKeeperUtils.startEmbedZooKeeper()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperUtils.startEmbedZooKeeper()方法的具体详情如下:
包路径:ml.shifu.guagua.coordinator.zk.ZooKeeperUtils
类名称:ZooKeeperUtils
方法名:startEmbedZooKeeper

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

相关文章