<?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: How to get backup hmaster in Hbase HA mode in ambari using command in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173334#M50272</link>
    <description>&lt;P&gt;You should also be able to specify the condition IsActiveMaster=false to have the API respond with non-active HBaseMasters only.  Instead of saying "fields=metrics/hbase/master/IsActiveMaster" in the query, you can turn that into a predicate by saying "metrics/hbase/master/IsActiveMaster=false".&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2016 02:00:36 GMT</pubDate>
    <dc:creator>yusaku</dc:creator>
    <dc:date>2016-12-29T02:00:36Z</dc:date>
    <item>
      <title>How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173331#M50269</link>
      <description>&lt;P&gt;Hi, guys, I am tryign to write a autotest shell script killing the hmasters in HA mode, do you know how can I get the backup hmaster host address by using the command? I can manully find it in the ambari UI, but can not locate it by using the command&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2016 16:43:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173331#M50269</guid>
      <dc:creator>xiaqinglinv5</dc:creator>
      <dc:date>2016-12-28T16:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173332#M50270</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13737/xiaqinglinv5.html" nodeid="13737"&gt;@Qinglin Xia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use the Ambari APIs to find that out using simple "curl" GET you should be able to find the Active HBase Master:&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://erie1.example.com:8080/api/v1/clusters/ErieCluster/components/HBASE_MASTER?ServiceComponentInfo/category=MASTER&amp;amp;fields=ServiceComponentInfo/service_name,host_components/HostRoles/display_name,host_components/metrics/hbase/master/IsActiveMaster" target="_blank"&gt;http://erie1.example.com:8080/api/v1/clusters/ErieCluster/components/HBASE_MASTER?ServiceComponentInfo/category=MASTER&amp;amp;fields=ServiceComponentInfo/service_name,host_components/HostRoles/display_name,host_components/metrics/hbase/master/IsActiveMaster&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Example Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
  "href" : "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/components/HBASE_MASTER?ServiceComponentInfo/category=MASTER&amp;amp;fields=ServiceComponentInfo/service_name,host_components/HostRoles/display_name,host_components/metrics/hbase/master/IsActiveMaster",
  "ServiceComponentInfo" : {
    "category" : "MASTER",
    "cluster_name" : "ErieCluster",
    "component_name" : "HBASE_MASTER",
    "service_name" : "HBASE"
  },
  "host_components" : [
    {
      "href" : "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie3.example.com/host_components/HBASE_MASTER",
      "HostRoles" : {
        "cluster_name" : "ErieCluster",
        "component_name" : "HBASE_MASTER",
        "display_name" : "HBase Master",
        "host_name" : "erie3.example.com"
      },
      "metrics" : {
        "hbase" : {
          "master" : {
            "IsActiveMaster" : "false"
          }
        }
      }
    },
    {
      "href" : "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie4.example.com/host_components/HBASE_MASTER",
      "HostRoles" : {
        "cluster_name" : "ErieCluster",
        "component_name" : "HBASE_MASTER",
        "display_name" : "HBase Master",
        "host_name" : "erie4.example.com"
      },
      "metrics" : {
        "hbase" : {
          "master" : {
            "IsActiveMaster" : "true"
          }
        }
      }
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Notice:   &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt; "IsActiveMaster" : "false"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2016 17:40:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173332#M50270</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2016-12-28T17:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173333#M50271</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13737/xiaqinglinv5.html" nodeid="13737"&gt;@Qinglin Xia&lt;/A&gt; &lt;/P&gt;&lt;P&gt;More easy command to access this info using curl by hitting the URL:  &lt;/P&gt;&lt;P&gt;&lt;A href="http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie3.example.com/host_components/HBASE_MASTER?fields=metrics/hbase/master/IsActiveMaster" target="_blank"&gt;http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie3.example.com/host_components/HBASE_MASTER?fields=metrics/hbase/master/IsActiveMaster&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt; curl -u admin:admin -H "X-Requested-By: ambari"  -X GET &lt;A href="http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie4.example.com/host_components/HBASE_MASTER?fields=metrics/hbase/master/IsActiveMaster" target="_blank"&gt;http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie4.example.com/host_components/HBASE_MASTER?fields=metrics/hbase/master/IsActiveMaster&lt;/A&gt;


{
  "href" : "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie4.example.com/host_components/HBASE_MASTER?fields=metrics/hbase/master/IsActiveMaster",
  "HostRoles" : {
    "cluster_name" : "ErieCluster",
    "component_name" : "HBASE_MASTER",
    "host_name" : "erie4.example.com"
  },
  "host" : {
    "href" : "http://erie1.example.com:8080/api/v1/clusters/ErieCluster/hosts/erie4.example.com"
  },
  "metrics" : {
    "hbase" : {
      "master" : {
        "IsActiveMaster" : "true"
      }
    }
  }
}&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2016 18:10:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173333#M50271</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2016-12-28T18:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173334#M50272</link>
      <description>&lt;P&gt;You should also be able to specify the condition IsActiveMaster=false to have the API respond with non-active HBaseMasters only.  Instead of saying "fields=metrics/hbase/master/IsActiveMaster" in the query, you can turn that into a predicate by saying "metrics/hbase/master/IsActiveMaster=false".&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2016 02:00:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173334#M50272</guid>
      <dc:creator>yusaku</dc:creator>
      <dc:date>2016-12-29T02:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173335#M50273</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13737/xiaqinglinv5.html" nodeid="13737"&gt;@Qinglin Xia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This can be achieved with single Ambari REST API as &lt;A rel="user" href="https://community.cloudera.com/users/313/yusaku.html" nodeid="313"&gt;@yusaku&lt;/A&gt; suggested. Following is the actual working API&lt;/P&gt;&lt;PRE&gt;{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/components/HBASE_MASTER?host_components/metrics/hbase/master/IsActiveMaster=true&amp;amp;fields=host_components/HostRoles/host_name",
  "ServiceComponentInfo" : {
    "cluster_name" : "c1",
    "component_name" : "HBASE_MASTER",
    "service_name" : "HBASE"
  },
  "host_components" : [
    {
      "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/HBASE_MASTER",
      "HostRoles" : {
        "cluster_name" : "c1",
        "component_name" : "HBASE_MASTER",
        "host_name" : "c6401.ambari.apache.org"
      },
      "metrics" : {
        "hbase" : {
          "master" : {
            "IsActiveMaster" : "true"
          }
        }
      }
    }
  ]
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Dec 2016 14:31:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173335#M50273</guid>
      <dc:creator>jaimin</dc:creator>
      <dc:date>2016-12-29T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173336#M50274</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13737/xiaqinglinv5.html" nodeid="13737"&gt;@Qinglin Xia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Additionally if you due to some reason if the Ambari is down (not accessible) and still if you want to get the Active HBase Master detail then you can simply use the HBase JMX for the same. Here "16010" is HBase JMX ui port.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exampe:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;$ curl -v --silent 'http://erie4.example.com:16010/jmx?qry=Hadoop:service=HBase,name=Master,sub=Server'  2&amp;gt;&amp;amp;1 | grep isActiveMaster
    "tag.isActiveMaster" : "true",


$ curl -v --silent 'http://erie3.example.com:16010/jmx?qry=Hadoop:service=HBase,name=Master,sub=Server'  2&amp;gt;&amp;amp;1 | grep isActiveMaster
    "tag.isActiveMaster" : "false",
&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Dec 2016 15:19:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173336#M50274</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2016-12-29T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get backup hmaster in Hbase HA mode in ambari using command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173337#M50275</link>
      <description>&lt;P&gt;Thanks, I used this url to get the backup masters&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://fsmanager:8080/api/v1/clusters/${cluster_name}/components/HBASE_MASTER?host_components/metrics/hbase/master/IsActiveMaster=false&amp;amp;fields=host_components/HostRoles/host_name" target="_blank"&gt;http://fsmanager:8080/api/v1/clusters/${cluster_name}/components/HBASE_MASTER?host_components/metrics/hbase/master/IsActiveMaster=false&amp;amp;fields=host_components/HostRoles/host_name&lt;/A&gt;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Dec 2016 11:26:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-backup-hmaster-in-Hbase-HA-mode-in-ambari-using/m-p/173337#M50275</guid>
      <dc:creator>xiaqinglinv5</dc:creator>
      <dc:date>2016-12-30T11:26:12Z</dc:date>
    </item>
  </channel>
</rss>

