ZooKeeperServer不存在于org.apache.zookeeper.server中,该server是从Kafka:kafka_2.12:jar:3.4.0导入的
对此有任何替代方案吗?
我检查了依赖层次结构zookeeper jar仍然存在,并且没有被apache Kafka完全删除
[INFO] +- org.apache.kafka:kafka_2.12:jar:3.4.0:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.12.15:compile
[INFO] | +- org.apache.kafka:kafka-server-common:jar:3.4.0:runtime
[INFO] | +- org.apache.kafka:kafka-group-coordinator:jar:3.4.0:runtime
[INFO] | +- org.apache.kafka:kafka-metadata:jar:3.4.0:runtime
[INFO] | +- org.apache.kafka:kafka-raft:jar:3.4.0:runtime
[INFO] | +- org.apache.kafka:kafka-storage:jar:3.4.0:runtime
[INFO] | | \- org.apache.kafka:kafka-storage-api:jar:3.4.0:runtime
[INFO] | +- net.sourceforge.argparse4j:argparse4j:jar:0.7.0:runtime
[INFO] | +- com.fasterxml.jackson.module:jackson-module-scala_2.12:jar:2.13.4:runtime
[INFO] | | \- com.thoughtworks.paranamer:paranamer:jar:2.8:runtime
[INFO] | +- com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.13.4:runtime
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.13.4:runtime
[INFO] | +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:runtime
[INFO] | +- org.bitbucket.b_c:jose4j:jar:0.7.9:runtime
[INFO] | +- com.yammer.metrics:metrics-core:jar:2.2.0:runtime
[INFO] | +- org.scala-lang.modules:scala-collection-compat_2.12:jar:2.6.0:runtime
[INFO] | +- org.scala-lang.modules:scala-java8-compat_2.12:jar:1.0.2:runtime
[INFO] | +- org.scala-lang:scala-reflect:jar:2.12.15:runtime
[INFO] | +- com.typesafe.scala-logging:scala-logging_2.12:jar:3.9.4:runtime
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.6.3:runtime
字符串
2条答案
按热度按时间pb3skfrl1#
我暂时显式地添加了依赖项,因为它不再存在于来自kafka_2.12的jar中
字符串
bzzcjhmw2#
kafka_2.12
是服务器包,不应用于Kafka客户端。你只需要kafka-clients
依赖,除非你试图对Kafka代理运行某种类型的集成测试。从Kafka Kraft模式发布开始,它不再需要Zookeeper。