Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 03-09-2017 04:54 PM
I want to get a list of services that are dependent on a particular service. Is there a direct api call to do that?
Created 03-09-2017 05:04 PM
The following ambari API can be used to see the required components list by a particular service like "Hive"
http://localhost:8080/api/v1/stacks/HDP/versions/2.5/services/HIVE
required_services: ["ZOOKEEPER", "HDFS", "YARN", "TEZ", "PIG", "SLIDER" ],
.
Created 03-09-2017 04:57 PM
Ambari services uses "metainfo.xml" file which provides the information about the dependencies "the list of components that this component depends on"
https://cwiki.apache.org/confluence/display/AMBARI/Writing+metainfo.xml
For example if we want to see "HIVE_SERVER" service is dependent on which all components.
Created 03-09-2017 05:04 PM
The following ambari API can be used to see the required components list by a particular service like "Hive"
http://localhost:8080/api/v1/stacks/HDP/versions/2.5/services/HIVE
required_services: ["ZOOKEEPER", "HDFS", "YARN", "TEZ", "PIG", "SLIDER" ],
.
Created 03-09-2017 05:08 PM
@Jay SenSharma Right, this gives me the services required for Hive. But what if I want to find what services are dependent on Hive? Maybe I can reverse look up by making this call for each service
Created 03-18-2017 03:49 AM
Created 03-09-2017 05:11 PM
You can use stack service API
e.g http://<AMBARI_SERVER_HOST>/api/v1/stacks/HDP/versions/<HDP_VERSION/services/<SERVICE_NAME>;
And use required_services from the response.
http://localhost:8080/api/v1/stacks/HDP/versions/2.6/services/AMBARI_INFRA