<?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 AMBARI REST API + how to stop/start individual kafka broker in kafka cluster in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/AMBARI-REST-API-how-to-stop-start-individual-kafka-broker-in/m-p/285053#M211591</link>
    <description>&lt;P&gt;hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we have 5 kafka brokers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we can stop or start the kafka service by API&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but how to stop specific kafka broker by REST API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example , in this pic we can see 5 kafka brokers , and we want to stop/start only the second kafka broker by REST API&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25651i7F0503FF2025625D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Dec 2019 04:42:18 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-12-08T04:42:18Z</dc:date>
    <item>
      <title>AMBARI REST API + how to stop/start individual kafka broker in kafka cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/AMBARI-REST-API-how-to-stop-start-individual-kafka-broker-in/m-p/285053#M211591</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we have 5 kafka brokers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we can stop or start the kafka service by API&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but how to stop specific kafka broker by REST API?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example , in this pic we can see 5 kafka brokers , and we want to stop/start only the second kafka broker by REST API&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25651i7F0503FF2025625D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 04:42:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/AMBARI-REST-API-how-to-stop-start-individual-kafka-broker-in/m-p/285053#M211591</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-12-08T04:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: AMBARI REST API + how to stop/start individual kafka broker in kafka cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/AMBARI-REST-API-how-to-stop-start-individual-kafka-broker-in/m-p/285066#M211599</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. You can &lt;EM&gt;&lt;STRONG&gt;get the List of KAFKA Broker Hosts (hostnames)&lt;/STRONG&gt;&lt;/EM&gt; using the following API call.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET http://$AMBARI_HOST:8080/api/v1/clusters/TestCluster/services/KAFKA/components/KAFKA_BROKER?fields=host_components/HostRoles/host_name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;2. Once you know/decide the Hostname (For example: '&lt;STRONG&gt;kafkabroker5&lt;/STRONG&gt;.example.com') in which you want to stop/start the Kafka Broker then you can try the following:&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A.&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;To Stop Kafka Broker on Host 'kafkabroker5.example.com'&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"TestCluster","host_name":"kafkabroker5.example.com","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://$AMBARI_HOST:8080/api/v1/clusters/TestCluster/hosts/kafkabroker5.example.com/host_components/KAFKA_BROKER&lt;/LI-CODE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;B.&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;To Start Kafka Broker on Host 'kafkabroker5.example.com'&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Start Kafka Broker","operation_level":{"level":"HOST_COMPONENT","cluster_name":"TestCluster","host_name":"kafkabroker5.example.com","service_name":"KAFKA"}},"Body":{"HostRoles":{"state":"STARTED"}}}' http://$AMBARI_HOST:8080/api/v1/clusters/TestCluster/hosts/kafkabroker5.example.com/host_components/KAFKA_BROKER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:37:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/AMBARI-REST-API-how-to-stop-start-individual-kafka-broker-in/m-p/285066#M211599</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-12-08T20:37:43Z</dc:date>
    </item>
  </channel>
</rss>

