Support Questions

Find answers, ask questions, and share your expertise

Unable to Locate Hadoop core-site.xml and hdfs-site.xml files in HDP

avatar
Contributor

I have to copy the core-site.xml and hdfs-site.xml from HDP but I am unable to locate this folder. As per the documentation, these files are placed at /etc/hadoop/ but when I go to etc folder I can not find any folder named "Hadoop".

2 REPLIES 2

avatar
Master Mentor

@Muhammad Umar

On this host where the HDP components are installed it can be found in the same directory as following:

# ls -l /etc/hadoop/conf/
total 200
-rw-r--r--. 1 hdfs   hadoop  3011 May  4 07:47 capacity-scheduler.xml
-rw-r--r--. 1 hdfs   root    1020 Aug 18  2016 commons-logging.properties
-rw-r--r--. 1 hdfs   hadoop  1335 Aug  3  2016 configuration.xsl
-rw-r--r--. 1 root   hadoop  1019 Aug 18  2016 container-executor.cfg
-rw-r--r--. 1 hdfs   hadoop  4305 Apr 20 07:11 core-site.xml
-rw-r--r--. 1 hdfs   hadoop     1 Aug 18  2016 dfs.exclude
-rw-r--r--. 1 root   root    3979 Aug  3  2016 hadoop-env.cmd
-rw-r--r--. 1 hdfs   hadoop  5508 Mar 25 12:28 hadoop-env.sh
-rw-r--r--. 1 hdfs   hadoop  2840 Mar 27 03:53 hadoop-metrics2.properties
-rw-r--r--. 1 root   root    2490 Aug  3  2016 hadoop-metrics.properties
-rw-r--r--. 1 hdfs   hadoop  1308 Aug 18  2016 hadoop-policy.xml
-rw-r--r--. 1 hdfs   hadoop  7999 May 10 11:41 hdfs-site.xml
-rw-r--r--. 1 hdfs   root    1602 Aug 18  2016 health_check
-rw-r--r--. 1 root   root    3518 Aug  3  2016 kms-acls.xml
-rw-r--r--. 1 root   root    1527 Aug  3  2016 kms-env.sh
-rw-r--r--. 1 root   root    1631 Aug  3  2016 kms-log4j.properties
-rw-r--r--. 1 root   root    5511 Aug  3  2016 kms-site.xml
-rw-r--r--. 1 hdfs   hadoop 10416 Aug 18  2016 log4j.properties
-rw-r--r--. 1 root   root     951 Aug  3  2016 mapred-env.cmd
-rwxr-xr-x. 1 hdfs   root     856 Aug 18  2016 mapred-env.sh
-rw-r--r--. 1 root   root    4113 Aug  3  2016 mapred-queues.xml.template
-rw-r--r--. 1 mapred hadoop  6748 May  4 08:17 mapred-site.xml
-rw-r--r--. 1 root   root     758 Aug  3  2016 mapred-site.xml.template
drwxr-xr-x. 2 root   hadoop  4096 Aug 18  2016 secure
-rw-r--r--. 1 hdfs   root      73 Mar 25 12:28 slaves
-rw-r--r--. 1 hdfs   hadoop   884 Aug 18  2016 ssl-client.xml
-rw-r--r--. 1 mapred hadoop  2316 Aug  3  2016 ssl-client.xml.example
-rw-r--r--. 1 hdfs   hadoop  1000 Aug 18  2016 ssl-server.xml
-rw-r--r--. 1 mapred hadoop  2697 Aug  3  2016 ssl-server.xml.example
-rw-r--r--. 1 hdfs   root     945 Aug 18  2016 taskcontroller.cfg
-rwxr-xr-x. 1 root   root    4221 Aug 18  2016 task-log4j.properties
-rw-r--r--. 1 hdfs   hadoop   243 Mar 25 12:29 topology_mappings.data
-rwxr-xr-x. 1 root   root    2358 Aug 18  2016 topology_script.py
-rw-r--r--. 1 root   root    2250 Aug  3  2016 yarn-env.cmd
-rwxr-xr-x. 1 yarn   hadoop  5297 May  2 06:18 yarn-env.sh
-rw-r--r--. 1 yarn   hadoop 17941 Nov 25 10:27 yarn-site.xml

.

So may be you are looking on an incorrect host. Please check if any HDP component is running on that host or not like following , (this is just to verify the hdp installation):

# ps -ef | grep DataNode
# ps -ef | grep NameNode
# hdp-select

.

If you want to download the "core-site.xml" and "hdfs-site.xml" for client side usage then it is an easiest option to download the client config from ambari UI.

Ambari UI --> "HDFS" --> "Service Action" --> "Download Client Configs"

### That will give you the following downloaded files:

core-site.xml        hadoop-env.sh        hdfs-site.xml        log4j.properties

.

avatar

It looks like you are not looking on the correct host. Can you confirm if logged onto to the correct host.