To get the broker registration data you need

get /brokers/ids/1  (ls /brokers/ids/1 will only retrieve its children,
which is null)

Guozhang


On Thu, Jan 16, 2014 at 6:36 PM, Jagbir Hooda <jsho...@hotmail.com> wrote:

> Hi,
>
> I've a setup of three kafka servers (kafka_2.8.0-0.8.0) and three
> zookeeper servers (zookeeper1, zookeeper2, zookeeper3).
>
> Everything works OK, but when I did a consumer test using nodejs package
> node-kafka it failed to retrieve any messages. When I looked more closely I
> found something interesting.
>
> When I do a zookeeper query using
>
> ----------------------8<----------------------------
> prompt> ./bin/zookeeper-shell.sh zookeeper2:2182
>
> ls /
> [controller, brokers, zookeeper, controller_epoch]
>
> ls /brokers
> [ids]
>
> ls /brokers/ids
> [3, 2, 1]
>
> ls /brokers/ids/1
> []
> ----------------------8<----------------------------
>
> there is no data for broker. As per
>
> https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeperthere
>  should be broker registration data here. (I get same results from
> other two zookeepers as well).
>
> The node-kafka consumer test that I mentioned earlier expects to find
> broker hostname and other connection information here, but it seems to be
> missing.
>
> I'll appreciate if anyone can suggest a solution.
>
> Thanks,
> jsh1234




-- 
-- Guozhang

Reply via email to