从客户端检索Kafka经纪人属性

编程入门 行业动态 更新时间:2024-10-25 06:23:19
本文介绍了从客户端检索Kafka经纪人属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道是否有一种方法可以使用shell命令来检索kafka代理的所有配置属性?

I was wondering if there is a way to retrieve all the configuration properties of a kafka broker using a shell command?

例如,类似:

./kafka-configs.sh --zookeeper ${broker_ip}:2181 --entity-type brokers --describe

上面的代码没有返回任何值,但是我希望通过查看命令可以使问题更清楚

The above doesn't return any value, but I hope the question is clearer looking at the command

推荐答案

您可以在代理启动时打印的Kafka代理日志文件中找到配置.恐怕有这样的命令列出了Kafka代理的所有配置参数.

You can find the configuration in the log file of Kafka broker which is printed on broker start up. I am afraid that there is such command that lists all the configuration parameters of a Kafka broker.

可以通过Zookeeper检索有关Kafka代理的更多信息(但是这些命令不会为您提供kafka的配置).为此,

Some more information regarding Kafka brokers can be retrieved through Zookeeper (however these commands won't give you the kafka configuration). To do so,

输入Zookeeper shell:

Enter Zookeeper shell:

zookeeper-shell localhost:2181

并运行

get /brokers/ids/0

检索ID为 0 的经纪人的其他信息.

to retrieve some further information for broker with id 0.

尽管 kafka-configs 声称能够描述kafka配置,命令

Although kafka-configs claims to be able to describe kafka configuration, command

kafka-configs --bootstrap-server localhost:9092 --describe --entity-type brokers --entity-name 0 Configs for broker 0 are:

似乎没有返回任何配置参数.

doesn't seem to return any configuration parameters.

更多推荐

从客户端检索Kafka经纪人属性

本文发布于:2023-10-19 18:04:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:经纪人   客户端   属性   Kafka

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!