<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question kafka configuration + zookeeper cli + get the right info for kafka host in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/kafka-configuration-zookeeper-cli-get-the-right-info-for/m-p/295747#M217934</link>
    <description>&lt;P&gt;As all know when is need to print the kafka broker id’s we can use the following cli&lt;/P&gt;
&lt;P&gt;zookeeper-shell.sh zoo_server1:2181 &amp;lt;&amp;lt;&amp;lt; "ls /brokers/ids"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;this cli print the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;WatchedEvent state:SyncConnected type:None path:null&lt;BR /&gt;[1018, 1017, 1016]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its means that we have kafka with id’s&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1018&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1017&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1016&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But our kafka names are&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Kafka_confluent01&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Kafka_confluent02&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Kafka_confluent03&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So how to know which kafka broker id ( 1018 , 1017 , 1016 ) is belong to the real host ( Kafka_confluent01 / Kafka_confluent02 / Kafka_confluent03 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 May 2020 14:35:56 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2020-05-11T14:35:56Z</dc:date>
    <item>
      <title>kafka configuration + zookeeper cli + get the right info for kafka host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/kafka-configuration-zookeeper-cli-get-the-right-info-for/m-p/295747#M217934</link>
      <description>&lt;P&gt;As all know when is need to print the kafka broker id’s we can use the following cli&lt;/P&gt;
&lt;P&gt;zookeeper-shell.sh zoo_server1:2181 &amp;lt;&amp;lt;&amp;lt; "ls /brokers/ids"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;this cli print the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;WatchedEvent state:SyncConnected type:None path:null&lt;BR /&gt;[1018, 1017, 1016]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its means that we have kafka with id’s&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1018&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1017&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1016&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;But our kafka names are&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Kafka_confluent01&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Kafka_confluent02&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Kafka_confluent03&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So how to know which kafka broker id ( 1018 , 1017 , 1016 ) is belong to the real host ( Kafka_confluent01 / Kafka_confluent02 / Kafka_confluent03 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 14:35:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/kafka-configuration-zookeeper-cli-get-the-right-info-for/m-p/295747#M217934</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-05-11T14:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: kafka configuration + zookeeper cli + get the right info for kafka host</title>
      <link>https://community.cloudera.com/t5/Support-Questions/kafka-configuration-zookeeper-cli-get-the-right-info-for/m-p/297119#M218602</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for posting your query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can execute 'get' on the same zookeeper client shell for the znode you would be able to get the hostname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;zookeeper-shell.sh zoo_server1:2181 &amp;lt;&amp;lt;&amp;lt; "ls /brokers/ids/1018"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It returns output as follows (example - in my case)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;[zk: localhost:2181(CONNECTED) 5] get /brokers/ids/10&lt;BR /&gt;{"listener_security_protocol_map":{"PLAINTEXT":"PLAINTEXT"},"endpoints":["PLAINTEXT://simple01.cloudera.com:9092"],"jmx_port":9393,"host":"simple01.cloudera.com","timestamp":"1590512066422","port":9092,"version":4}&lt;BR /&gt;cZxid = 0x1619b&lt;BR /&gt;ctime = Tue May 26 09:54:26 PDT 2020&lt;BR /&gt;mZxid = 0x1619b&lt;BR /&gt;mtime = Tue May 26 09:54:26 PDT 2020&lt;BR /&gt;pZxid = 0x1619b&lt;BR /&gt;cversion = 0&lt;BR /&gt;dataVersion = 1&lt;BR /&gt;aclVersion = 0&lt;BR /&gt;ephemeralOwner = 0x1722ddb1e844d50&lt;BR /&gt;dataLength = 238&lt;BR /&gt;numChildren = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, my brokerID 10 is mapped with the host: simple01.cloudera.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 01:22:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/kafka-configuration-zookeeper-cli-get-the-right-info-for/m-p/297119#M218602</guid>
      <dc:creator>satz</dc:creator>
      <dc:date>2020-06-03T01:22:14Z</dc:date>
    </item>
  </channel>
</rss>

