<?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 Re: creat script that stop hive on My cluster in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221657#M74781</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@yassine sihi&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One command is to  &lt;STRONG&gt;To stop &lt;/STRONG&gt;HiveServer2&lt;STRONG&gt; on host "&lt;A href="http://amb25103.example.com"&gt;amb25103.example.com&lt;/A&gt;"&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And the other command is to&lt;STRONG&gt;  To stop &lt;/STRONG&gt;HiveMetastore&lt;STRONG&gt; on host "&lt;A href="http://amb25103.example.com"&gt;amb25103.example.com&lt;/A&gt;"&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to stop the Whole Hive Service then please refer to my previous command in same thread:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To stop whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To start whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;
.&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 18:58:27 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-02-20T18:58:27Z</dc:date>
    <item>
      <title>creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221650#M74774</link>
      <description>&lt;P&gt;I need to create a script shell that stops the Hive Metastore and Hive Server2  from any node of cluster and I need to know where the hive is hosted in My cluster in order to run this command:&lt;/P&gt;&lt;P&gt;ssh nodename:ps aux | awk '{print $1,$2}' | grep hive | awk '{print
$2}' | xargs kill &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;how can I know where nodes hive is hosted?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:11:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221650#M74774</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-02-20T18:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221651#M74775</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@yassine sihi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have Ambari managed cluster then you can find that information just by a  simple API call:&lt;/P&gt;&lt;P&gt;1. To findout Hive metastore host:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_METASTORE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_METASTORE&lt;/A&gt; | grep 'host_name' | awk '{print $NF}' 
&lt;/PRE&gt;&lt;P&gt;2. To findout Hive Server2 host.&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X GET &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_SERVER" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE/components/HIVE_SERVER&lt;/A&gt; | grep 'host_name' | awk '{print $NF}' 
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;You will need to replace  "amb25101.example.com" with Ambari Server Hostname.   Also the "plain_ambari" with your Ambari cluster name.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:37:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221651#M74775</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-20T18:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221652#M74776</link>
      <description>&lt;P style="margin-left: 20px;"&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;is there some alternative to stop the whole service "hive service" on one command??&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:40:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221652#M74776</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-02-20T18:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221653#M74777</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@yassine sihi&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Similarly you can use the following API calls to stop the HIveServer2 &amp;amp; Metastore:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;To stop HiveServer2 on host "amb25103.example.com"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT  -d '{"RequestInfo":{"context":"Stop HiveServer2","operation_level":{"level":"HOST_COMPONENT","cluster_name":"plain_ambari","host_name":"amb25103.example.com","service_name":"HIVE"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_SERVER" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_SERVER&lt;/A&gt;?&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;To stop HiveMetastore on host "amb25103.example.com"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT  -d '{"RequestInfo":{"context":"Stop Hive Metastore","operation_level":{"level":"HOST_COMPONENT","cluster_name":"plain_ambari","host_name":"amb25103.example.com","service_name":"HIVE"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_METASTORE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/hosts/amb25103.example.com/host_components/HIVE_METASTORE&lt;/A&gt;?&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:41:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221653#M74777</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-20T18:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221654#M74778</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;do I need to run the both command to stop hive, isn't there one command that can do this??  &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:44:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221654#M74778</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-02-20T18:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221655#M74779</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@yassine sihi&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To stop whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To start whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:44:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221655#M74779</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-20T18:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221656#M74780</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Do I need to run the both command to stop hive service, isn't there one line command that can do this??&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:53:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221656#M74780</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-02-20T18:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221657#M74781</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@yassine sihi&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One command is to  &lt;STRONG&gt;To stop &lt;/STRONG&gt;HiveServer2&lt;STRONG&gt; on host "&lt;A href="http://amb25103.example.com"&gt;amb25103.example.com&lt;/A&gt;"&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And the other command is to&lt;STRONG&gt;  To stop &lt;/STRONG&gt;HiveMetastore&lt;STRONG&gt; on host "&lt;A href="http://amb25103.example.com"&gt;amb25103.example.com&lt;/A&gt;"&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to stop the Whole Hive Service then please refer to my previous command in same thread:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To stop whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To start whole "Hive Service"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.HIVE","operation_level":{"level":"SERVICE","cluster_name":"plain_ambari","service_name":"HIVE"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' &lt;A href="http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE" target="_blank"&gt;http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/services/HIVE&lt;/A&gt;&lt;/PRE&gt;
.&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 18:58:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221657#M74781</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-20T18:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221658#M74782</link>
      <description>&lt;P&gt;ok thanks &lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 19:39:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221658#M74782</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-02-20T19:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: creat script that stop hive on My cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221659#M74783</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@Yassine&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If this answers your query then please mark this thread as answered by 
clicking on the "Accepted" button that way other HCC users can quickly 
browser the answered queries.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 04:34:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/creat-script-that-stop-hive-on-My-cluster/m-p/221659#M74783</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-02-26T04:34:25Z</dc:date>
    </item>
  </channel>
</rss>

