ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang Ruiqiang" <zh....@163.com>
Subject Re:Re: How to get Ambari server host in status function of service control script
Date Thu, 07 Jan 2016 16:47:10 GMT
      I want to integrate HUE as a custom service. The configurations of HUE are depends on
configurations of other services, e.g. namenode host, resourcemanager host. So I want to check
related services' configurations in HUE's status function, once there is modification found,
a new configuration for HUE will be generated.
      I get the related configurations using REST API, so the ambari server host is required.


Thanks!







At 2016-01-08 00:02:13, "Nate Cole" <ncole@hortonworks.com> wrote:

Status commands are meant to be run for the component for which it is designed, usually just
a pid check.  Therefore, cluster topology does not get passed for status commands.


What are you trying to achieve by accessing the API?


Thanks


From: Zhang Ruiqiang <zh.r.q@163.com>
Reply-To: "user@ambari.apache.org" <user@ambari.apache.org>
Date: Thursday, January 7, 2016 at 10:54 AM
To: "user@ambari.apache.org" <user@ambari.apache.org>
Subject: How to get Ambari server host in status function of service control script



Hi all:
      I want to do use the REST API in status function, so I should get the ambari server
host. In start/stop function, it can be get by Script.get_confgi()['clusterInfo']['ambariServerHost'].
 But in status function, the key was not exist. Maybe, i can get it by Script.get_confgi()['jdk_location']
indirectly, but I think this is not elegant.
      Is there a better solution?


Thanks!






 
Mime
View raw message