- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Ambari rest API to get host of particular components.
- Labels:
-
Apache Ambari
Created ‎08-14-2016 09:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here i just want to get my resource manager hostip and its port.
example : -: http://IP:8088, http://IP:50070, http://IP:19888.
Created ‎08-15-2016 01:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's start with: https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md
Get a list of services:
GET /clusters/:name/services
For any of the services listed, including ResourceManager, view service information:
GET /clusters/:clusterName/services/:serviceName
Of course, prepend the GET statements with:
curl -u admin:admin -H
"X-Requested-By: ambari"
-X
Another useful reference: https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+compon...
Please vote/accept answer, if helpful.
Created ‎08-15-2016 01:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's start with: https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md
Get a list of services:
GET /clusters/:name/services
For any of the services listed, including ResourceManager, view service information:
GET /clusters/:clusterName/services/:serviceName
Of course, prepend the GET statements with:
curl -u admin:admin -H
"X-Requested-By: ambari"
-X
Another useful reference: https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+compon...
Please vote/accept answer, if helpful.
Created ‎09-29-2017 12:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may also find the information you see in this article: Using Ambari to Automate Knox Topology Definitions.
Specifically, while the following API will get you all the host component details, including the host(s),
api/v1/clusters/clustername/services/YARN/components/RESOURCEMANAGER
it will not get you the appropriate ports.
For that, you need to interrogate the active YARN service configuration:
api/v1/clusters/clustername/configurations/service_config_versions?service_name=YARN
And look for the yarn-site configuration type, and the following properties therein:
- yarn.http.policy
This will tell you if http is sufficient, or if you need to use https - yarn.resourcemanager.address
The value of this property is the HOST:PORT address you originally requested.
I hope that helps...
