gpt4 book ai didi

io.pravega.controller.store.stream.ZKStoreHelper.addNode()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:59:06 26 4
gpt4 key购买 nike

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

ZKStoreHelper.addNode介绍

暂无

代码示例

代码示例来源:origin: pravega/pravega

@Override
public CompletableFuture<Void> createScope() {
  return store.addNode(scopePath);
}

代码示例来源:origin: pravega/pravega

@Test
public void testAddNode() throws ExecutionException, InterruptedException, IOException {
  Assert.assertNull(zkStoreHelper.addNode("/test/test1").get());
  AssertExtensions.assertFutureThrows("Should throw NodeExistsException", zkStoreHelper.addNode("/test/test1"),
      e -> e instanceof StoreException.DataExistsException);
  zkServer.stop();
  AssertExtensions.assertFutureThrows("Should throw UnknownException", zkStoreHelper.addNode("/test/test2"),
      e -> e instanceof StoreException.StoreConnectionException);
}

代码示例来源:origin: pravega/pravega

@Test
public void testDeleteNode() throws ExecutionException, InterruptedException, IOException {
  Assert.assertNull(zkStoreHelper.addNode("/test/test1").get());
  Assert.assertNull(zkStoreHelper.addNode("/test/test1/test2").get());
  AssertExtensions.assertFutureThrows("Should throw NodeNotEmptyException", zkStoreHelper.deleteNode("/test/test1"),
      e -> e instanceof StoreException.DataNotEmptyException);
  Assert.assertNull(zkStoreHelper.deleteNode("/test/test1/test2").get());
  Assert.assertNull(zkStoreHelper.deleteNode("/test/test1").get());
  AssertExtensions.assertFutureThrows("Should throw NodeNotFoundException", zkStoreHelper.deleteNode("/test/test1"),
      e -> e instanceof StoreException.DataNotFoundException);
  zkServer.stop();
  AssertExtensions.assertFutureThrows("Should throw UnknownException", zkStoreHelper.deleteNode("/test/test1"),
      e -> e instanceof StoreException.StoreConnectionException);
}

26 4 0