Drew
Drew

Reputation: 57

get location of core-site and hdfs-site from ambari manager

I need to be able to find the location of the core-site.xml and hdfs-site.xml that Ambari manager is using.

My initial thought is to query the Ambari API to do this, but I cant find any endpoint that will return a path to either of those two file.

Can anyone point me in the right direction? I've been trawling through Ambari docs and google searches to no avail.

Thanks in advance!!

~Drew

Upvotes: 1

Views: 1151

Answers (1)

cjackson
cjackson

Reputation: 1637

The configuration directories for these services are static. They are defined in the params.py file within the service definition. For example in Ambari 2.0 you can look at HDFS service definitions params.py file at location:

/var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params.py

You will find in that file the following value:

hadoop_conf_dir = "/etc/hadoop/conf"

Upvotes: 4

Related Questions