gpt4 book ai didi

com.ngdata.sep.util.zookeeper.ZkUtil.connect()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 02:47:31 26 4
gpt4 key购买 nike

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

ZkUtil.connect介绍

暂无

代码示例

代码示例来源:origin: NGDATA/hbase-indexer

private JettySolrRunner createServer() throws Exception {
  // create path on zookeeper for solr cloud
  ZooKeeperItf zk = ZkUtil.connect("localhost:" + zkClientPort, 10000);
  ZkUtil.createPath(zk, "/solr");
  zk.close();
  return new JettySolrRunner(solrHomeDir.toString(), "/solr", solrPort);
}

代码示例来源:origin: com.ngdata/hbase-indexer-common

private JettySolrRunner createServer() throws Exception {
  // create path on zookeeper for solr cloud
  ZooKeeperItf zk = ZkUtil.connect("localhost:" + zkClientPort, 10000);
  ZkUtil.createPath(zk, "/solr");
  zk.close();
  return new JettySolrRunner(solrHomeDir.toString(), "/solr", solrPort);
}

代码示例来源:origin: NGDATA/hbase-indexer

public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  conf.setBoolean("hbase.replication", true);
  ZooKeeperItf zk = ZkUtil.connect("localhost", 20000);
  SepModel sepModel = new SepModelImpl(zk, conf);
  final String subscriptionName = "logger";
  if (!sepModel.hasSubscription(subscriptionName)) {
    sepModel.addSubscriptionSilent(subscriptionName);
  }
  PayloadExtractor payloadExtractor = new BasePayloadExtractor(Bytes.toBytes("sep-user-demo"), Bytes.toBytes("info"),
      Bytes.toBytes("payload"));
  SepConsumer sepConsumer = new SepConsumer(subscriptionName, 0, new EventLogger(), 1, "localhost", zk, conf,
      payloadExtractor);
  sepConsumer.start();
  System.out.println("Started");
  while (true) {
    Thread.sleep(Long.MAX_VALUE);
  }
}

代码示例来源:origin: NGDATA/hbase-indexer

ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);
waitUntilReplicationDone(zk, options.valueOf(hbaseMasterPortOption));

代码示例来源:origin: com.ngdata/hbase-sep-tools

ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);
waitUntilReplicationDone(zk, options.valueOf(hbaseMasterPortOption), options.has(useSSL), options.valueOf(zookeeperZNodeParentOption));

代码示例来源:origin: NGDATA/hbase-indexer

ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);

代码示例来源:origin: com.ngdata/hbase-sep-tools

ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com