@tyadav
Every service provides a "metainfo.xml" file which is used by ambari to determine the <dependencies> between individual service/components.
For example in case of HIVE service you can see a "metainfo.xml" file in the following location.
/var/lib/ambari-server/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml
/var/lib/ambari-server/resources/stacks/HDP/3.0/services/HIVE/metainfo.xml
You can find the <dependencies> tab inside this file which talks about the component dependencies. For example you can see the "HIVE_SERVER" dependencies as following:
<component>
<name>HIVE_SERVER</name>
<displayName>HiveServer2</displayName>
<category>MASTER</category>
<cardinality>1</cardinality>
<versionAdvertised>true</versionAdvertised>
<reassignAllowed>true</reassignAllowed>
<clientsToUpdateConfigs></clientsToUpdateConfigs>
<dependencies>
<dependency>
<name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
<scope>cluster</scope>
<auto-deploy>
<enabled>true</enabled>
<co-locate>HIVE/HIVE_SERVER</co-locate>
</auto-deploy>
</dependency>
<dependency>
<name>YARN/YARN_CLIENT</name>
<scope>host</scope>
<auto-deploy>
<enabled>true</enabled>
</auto-deploy>
</dependency>
<dependency>
<name>MAPREDUCE2/MAPREDUCE2_CLIENT</name>
<scope>host</scope>
<auto-deploy>
<enabled>true</enabled>
</auto-deploy>
</dependency>
</dependencies>
.
Similarly you can also find the dependencies using the following kind of Ambari API call:
# curl -sk -u admin:admin -H "X-Requested-By: ambari" -X GET http://$AMBARI_HOST:8080/api/v1/stacks/HDP/versions/3.1/services/HIVE | grep -A5 'required_services'
"required_services" : [
"ZOOKEEPER",
"HDFS",
"YARN",
"TEZ"
],
.
.
If your question is answered then, Please make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.