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,310 points
2,806 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,870 points

Related Questions In Big Data Hadoop

0 votes
2 answers

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

It allows to run dfs commands more ...READ MORE

answered Jan 22 in Big Data Hadoop by MD
• 8,870 points
2,179 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
• 69,000 points
1,666 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,050 points
2,338 views
+1 vote
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,870 points
4,565 views
+1 vote
11 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
25,899 views
–1 vote
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,310 points
1,713 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,870 points
2,329 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,870 points
259 views