gpt4 book ai didi

org.apache.ignite.spi.discovery.zk.internal.ZookeeperClient.zk()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 09:51:44 28 4
gpt4 key购买 nike

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

ZookeeperClient.zk介绍

暂无

代码示例

代码示例来源:origin: apache/ignite

/** */
  public String getZkSessionId() {
    if (rtState.zkClient != null && rtState.zkClient.zk() != null)
      return Long.toHexString(rtState.zkClient.zk().getSessionId());
    else
      return null;
  }
}

代码示例来源:origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testClose() throws Exception {
  startZK(1);
  final ZookeeperClient client = createClient(SES_TIMEOUT);
  client.createIfNeeded("/apacheIgnite1", null, CreateMode.PERSISTENT);
  client.zk().close();
  GridTestUtils.assertThrows(log, new Callable<Void>() {
    @Override public Void call() throws Exception {
      client.createIfNeeded("/apacheIgnite2", null, CreateMode.PERSISTENT);
      return null;
    }
  }, ZookeeperClientFailedException.class, null);
}

代码示例来源:origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testSaveLargeValue() throws Exception {
  startZK(1);
  final ZookeeperClient client = createClient(SES_TIMEOUT);
  byte[] data = new byte[1024 * 1024];
  String basePath = "/ignite";
  assertTrue(client.needSplitNodeData(basePath, data, 2));
  List<byte[]> parts = client.splitNodeData(basePath, data, 2);
  assertTrue(parts.size() > 1);
  ZooKeeper zk = client.zk();
  for (int i = 0; i < parts.size(); i++) {
    byte[] part = parts.get(i);
    assertTrue(part.length > 0);
    String path0 = basePath + ":" + i;
    zk.create(path0, part, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
  }
}

代码示例来源:origin: apache/ignite

log.info("Node started join [nodeId=" + locNode.id() +
  ", instanceName=" + locNode.attribute(ATTR_IGNITE_INSTANCE_NAME) +
  ", zkSessionId=0x" + Long.toHexString(rtState.zkClient.zk().getSessionId()) +
  ", joinDataSize=" + joinDataBytes.length +
  (rtState.joinDataPartCnt > 1 ? (", joinDataPartCnt=" + rtState.joinDataPartCnt) : "") +

代码示例来源:origin: apache/ignite

ZkPinger pinger = new ZkPinger(log, rtState.zkClient.zk(), zkPaths);

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