Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache kafka zookeeper-server-start.sh和kafka-server-start.sh之间的差异_Apache Kafka_Apache Zookeeper - Fatal编程技术网

Apache kafka zookeeper-server-start.sh和kafka-server-start.sh之间的差异

Apache kafka zookeeper-server-start.sh和kafka-server-start.sh之间的差异,apache-kafka,apache-zookeeper,Apache Kafka,Apache Zookeeper,其中一个是否比另一个更推荐/更喜欢使用?卡夫卡使用Zookeeper,因此您必须在启动卡夫卡代理之前启动Zookeeper服务器。Zookeeper和Kafka代理是两个截然不同的东西,它们都是运行Kafka集群所必需的。Kafka是一个分布式系统,使用Zookeeper构建,Zookeeper负责控制器选择、主题配置、集群等 为了运行Zookeeper,您需要在配置文件config/Zookeeper.properties中设置参数,然后使用 bin/zookeeper-server-star

其中一个是否比另一个更推荐/更喜欢使用?

卡夫卡使用Zookeeper,因此您必须在启动卡夫卡代理之前启动Zookeeper服务器。Zookeeper和Kafka代理是两个截然不同的东西,它们都是运行Kafka集群所必需的。Kafka是一个分布式系统,使用Zookeeper构建,Zookeeper负责控制器选择、主题配置、集群等

为了运行Zookeeper,您需要在配置文件
config/Zookeeper.properties
中设置参数,然后使用

bin/zookeeper-server-start.sh config/zookeeper.properties
然后,您需要运行至少一个Kafka代理,该代理可以在
config/server.properties
文件中配置,然后使用

bin/kafka-server-start.sh config/server.properties

Zookeeper-server-start.sh将启动Zookeeper服务器,默认情况下,该服务器在端口2181上运行

要使用kafka代理、主题和分区,您需要运行zookeeper服务器,zookeeper充当kafka代理的管理器

Kafka-server-start.sh将启动您的Kafka代理

Zookeeper服务器启动。sh
接受
zookeeper.properties
配置文件

卡夫卡服务器启动
接受卡夫卡
server.properties
用于配置的文件

不清楚您为什么认为推荐一个而不是另一个。这两个文件都是必需的。卡夫卡之前的动物园管理员