Exemplo n.º 1
0
 def getBaseUrl(self):
     from beaver.component.ambari import Ambari
     GRAFANA_HOST = Ambari.getHostsForComponent('METRICS_GRAFANA')[0]
     if Hadoop.isEncrypted() or Machine.isHumboldt():
         GRAFANA_URL = "https://%s:3000/dashboard/db/hbase-tuning" % (GRAFANA_HOST)
     else:
         GRAFANA_URL = "http://%s:3000/dashboard/db/hbase-tuning" % (GRAFANA_HOST)
     self.base_url = GRAFANA_URL
     return self.base_url
Exemplo n.º 2
0
 def getPhoenixQueryServers(cls, host=None, reRunStatus=False):
     if host:
         phoenixqueryservers = Ambari.getHostsForComponent(
             cls._ambariComponentMapping.get('phoenix_query_server'),
             weburl=Ambari.getWebUrl(hostname=host))
         phoenixqueryservers = [
             pqs.encode('ascii') for pqs in phoenixqueryservers
         ]
         logger.info("---------- phoenixqueryservers: %s",
                     phoenixqueryservers)
         return phoenixqueryservers
     if (not cls._phoenixqueryservers) or reRunStatus:
         cls._phoenixqueryservers = Ambari.getHostsForComponent(
             cls._ambariComponentMapping.get('phoenix_query_server'))
         cls._phoenixqueryservers = [
             pqs.encode('ascii') for pqs in cls._phoenixqueryservers
         ]
         logger.info("---------- cls._phoenixqueryservers: %s",
                     cls._phoenixqueryservers)
     return cls._phoenixqueryservers
Exemplo n.º 3
0
 def getServicesHost(self, component):
     host_list = Ambari.getHostsForComponent()
     hostList = ','.join([str(i) for i in host_list])
     return hostList
Exemplo n.º 4
0
 def getOozieServers(cls):
     if cls._oozieHosts is None:
         cls._oozieHosts = Ambari.getHostsForComponent(
             cls._compSvcMap['oozie_server'])
     return cls._oozieHosts
Exemplo n.º 5
0
    def getZKHosts(cls, ignoreError=False):
        if cls._zkHosts and len(cls._zkHosts) >= 3:
            return cls._zkHosts

        cls._zkHosts = Ambari.getHostsForComponent('ZOOKEEPER_SERVER')
        return cls._zkHosts
Exemplo n.º 6
0
 def getHiveserver2Hosts(cls):
     if cls._hiveServerInteractiveHosts is None:
         cls._hiveServerInteractiveHosts = Ambari.getHostsForComponent(cls._compSvcMap['hiveserver2'])
     return cls._hiveServerInteractiveHosts
Exemplo n.º 7
0
 def getHiveMetastoreHosts(cls):
     if cls._hiveMetastoreHosts is None:
         cls._hiveMetastoreHosts = Ambari.getHostsForComponent(cls._compSvcMap['metastore'])
     return cls._hiveMetastoreHosts