Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (55.6k points)

Can anyone tell me which configuration file is used to control the HDFS replication factor?

1 Answer

0 votes
by (119k points)

First let us understand about Replication factor. The replication factor represents number of copies of a block that must be there in the cluster. This value is by default 3 (comprises one original block and 2 replicas). So, every time we create a file in HDFS will have a replication factor as 3.

You can check the replication factor from the hdfs-site.xml fie from conf/ directory of the Hadoop installation directory.

hdfs-site.xml configuration file is used to control the HDFS replication factor.

Hdfs-site.xml looks like the following and you can change dfs.replication property to modify the default replication factor to all the files of HDFS.

<property>

<name>dfs.replication</name>

<value>3</value>

<description>BlockReplication</description>

</property>

If you wish to learn Hadoop from Industry experts, you can enroll in this Hadoop Certification course by Intellipaat.

I recommend watching this video on how HDFS works to understand in detail:

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...