本文整理了Java中io.pravega.controller.store.stream.ZKStoreHelper.addNode()
方法的一些代码示例,展示了ZKStoreHelper.addNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKStoreHelper.addNode()
方法的具体详情如下:
包路径:io.pravega.controller.store.stream.ZKStoreHelper
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!