You can get the Ambari server info from Agent conf file (e.g. /etc/ambari-agent/conf/ambari-agent.ini). Btw, there is link about HUE integration with Ambari ( https://developer.ibm.com/hadoop/blog/2015/10/27/how-to-install-hue-3-9-on-top-of-biginsights-4-1/ ).
Regards, Zhaowei Shen From: "Zhang Ruiqiang" <[email protected]> To: [email protected] Date: 2016-01-08 上午 12:48 Subject: Re:Re: How to get Ambari server host in status function of service control script 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" <[email protected]> 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 <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Thursday, January 7, 2016 at 10:54 AM To: "[email protected]" <[email protected]> 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!
