如何让 Zookeeper 为 Druid 提供 IP 而不是主机名

How to get Zookeeper to serve up an IP instead of a hostname for Druid

我不确定这应该是 Druid 还是 Zookeeper 的问题。

Druid 使用 Zookeeper 来发现 Druid 节点。在我的设置中,Druid 节点是 AWS 自动缩放实例并获取不通过 DNS 解析的主机名。所以当 Druid 询问 ZK 时,它返回:

spanky-asg-druid-master-10-0-10-218.sandbox-foo.net:8081

有没有办法将 ZK 配置为 return IP 而不是主机名,或者 Druid 向 ZK 询问 IP?

如果您在 Druid 进程的运行时属性中设置 druid.host=1.2.3.4(当然要使用正确的 IP),那么它们将在 ZK 中使用 IP 而不是主机名进行声明。