前端时间在使用curator访问zookpeeter的时候报
Caused by: java.lang.NoSuchMethodError: org.apache.zookeeper.server.quorum.flexible.QuorumMaj.<init>(Ljava/util/Map;)V
因为本身引入了curator和zookeeper的jar包 所以我一看这个错误应该是curator是用的zookeeper进行编译的时候和我引进的zookeeper的jar不一致。
果然我查询curator官网发现了:
果断是版本冲突。
相关推荐
server程序入口(启动类在zookeeper-server/src/main/java文件夹中,org.apache.zookeeper.server.quorum.QuorumPeerMain),program argument为conf/zoo.cfg,将conf/log4j.properties配置拷贝到zookeeper-server/...
这个只是其中一个版本的包,详细的可以在http://maven.outofmemory.cn/org.apache.zookeeper/zookeeper/里面找到更多的
<groupId>org.apache.curator</groupId> <artifactId>curator-framework</artifactId> <version>2.12.0</version> </dependency> <dependency> <groupId>org.apache.curator</groupId> <artifactId>curator-...
<zookeeper.version>3.4.8</zookeeper.version> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </...
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property> <property> <name>dfs.ha.fencing.methods</name> <value>sshfence</value> </property> ...
<name>ha.zookeeper.quorum</name> <value>hadoop1:2181,hadoop2:2181,hadoop3:2181</value> </property> ``` - 配置临时工作目录: ```xml <property> <name>hadoop.tmp.dir</name> <value>/root/hadoop_...
import org.apache.zookeeper.ZooDefs.Ids; public class ZookeeperClient { public static void main(String[] args) { CuratorFramework client = CuratorFrameworkFactory.builder() .connectString(...
apache-zookeeper分布式框架,压缩包内容:(apache-zookeeper-3.7.1-bin.tar.gz、apache-zookeeper-3.7.1.tar.gz、apache-zookeeper-3.6.4-bin.tar.gz、apache-zookeeper-3.6.4.tar.gz、apache-zookeeper-3.5.10-...
<name>hbase.zookeeper.quorum</name> <value>zk1,zk2,zk3</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/data/zookeeper/data</value> </property> </...
apache-zookeeper-3.7.1-bin.tar.gz 内容概要:通过带着读者手写简化版Spring框架,了解Spring核心原理。在手写Spring源码的过程中会摘取整体框架中的核心逻辑,简化代码实现过程,保留核心功能,例如:IOC, AOP、 Bean...
<module>cloud-eureka-server7001</module> </modules> <packaging>pom</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven....
<name>ha.zookeeper.quorum</name> <value>zk1,zk2,zk3</value> </property> ``` - 配置`hdfs-site.xml`,定义NameNode的HA和JournalNode: ```xml <property> <name>dfs.nameservices</name> <value>name...
<name>ha.zookeeper.quorum</name> <value>zookeeper1:2181,zookeeper2:2181,zookeeper3:2181</value> </property> ``` 完成以上步骤后,HDFS HA就配置好了。在实际操作中,还需要注意监控和日志管理,以便及时...
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property> </configuration> ``` 上述配置中,`dfs.nameservices`定义了NameNode服务的名字,`dfs.ha.namenodes....
<groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.5.8</version> </dependency> </dependencies> ``` ##### 创建客户端实例 下面是一个简单的Java类示例,展示了如何...
<dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.10</version> <type>pom</type> </dependency>
<dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.4.6</version> <type>pom</type> </dependency>
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-...