在项目中使用到Apache Curator Framework连接zookeeper-3.4.5-cdh5.7.0,使用的Curator Framework版本是最新版4.0.1
<!-- https://mvnrepository.com/artifact/org.apache.curator/curator-framework -->
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>4.0.1</version>
</dependency>
结果在使用CuratorFramework.create()方法创建新的节点时,抛出异常如下:
org.apache.zookeeper.KeeperException$UnimplementedException:
KeeperErrorCode = Unimplemented for [zk节点路径名]
开始我以为是我设置的zk节点路径不正确,结果加上了/zookeeper父路径后,抛出同样的异常,google了一下才知道,Curator Framework的2.x.x版本和3.x.x版本对Zookeeper支持的版本是有差异的,查看Curator Framework的官网(http://curator.apache.org),在Versions部分有这么一段话:
Versions
The are currently two released versions of Curator, 2.x.x and 3.x.x:
Curator 2.x.x -