Where to set hadoop.tmp.dir? core-site.xml or hdfs-site.xml?

+1 vote

While searching on Internet I found that somewhere it is mentioned that hadoop.tmp.dir be set in hdfs-site.xml and somewhere it is mentioned to specify it in core-site.xml. Which is the right place to put it?

Mar 26, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
1,662 views

1 answer to this question.

0 votes

hadoop.tmp.dir (A base for other temporary directories) is property, that need to be set in core-site.xml

Ex:

<name>dfs.namenode.name.dir</name>
<value>file://${hadoop.tmp.dir}/dfs/name</value>

You can use reference of hadoop.tmp.dir in hdfs-site.xml like above

For more core-site.xml and hdfs-site.xml

There're three HDFS properties which contain hadoop.tmp.dir in their values

dfs.name.dir: directory where namenode stores its metadata, with default value ${hadoop.tmp.dir}/dfs/name.

dfs.data.dir: directory where HDFS data blocks are stored, with default value ${hadoop.tmp.dir}/dfs/data.

fs.checkpoint.dir: directory where secondary namenode store its checkpoints, default value is${hadoop.tmp.dir}/dfs/namesecondary

answered Mar 26, 2018 by nitinrawat895
• 10,490 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Meaning of fs.defaultFS property in core-site.xml in hadoop

fs.default.name property in core-site.xml tells the address ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,290 points
1,097 views
0 votes
1 answer

Hadoop Hive: recursively descending into subdirectories without partitions or editing hive-site.xml

 I set the following properties before I ...READ MORE

answered Nov 15, 2018 in Big Data Hadoop by Omkar
• 67,290 points
691 views
0 votes
1 answer

How to programmatically access hadoop cluster where kerberos is enable?

Okay,here's the code snippet to work in the ...READ MORE

answered Mar 27, 2018 in Big Data Hadoop by coldcode
• 2,020 points
1,281 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,490 points
2,380 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
12,142 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
893 views
0 votes
1 answer
0 votes
1 answer

What is hadoop.tmp.dir ?

hadoop.tmp.dir is used as the base for temporary ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by nitinrawat895
• 10,490 points
1,438 views
0 votes
1 answer

How can Hadoop discover missing or corrupt HDFS data?

HDFS supports fsck command to check for ...READ MORE

answered Jul 19, 2018 in Big Data Hadoop by nitinrawat895
• 10,490 points
110 views