Nov 7, 2020 in HDFS
Q: What is the default replication factor and how will you change it?

1 Answer

0 votes
Nov 7, 2020

What is the default replication factor and how will you change it?

The default replication factor is 3. One can change this in following three ways:

By adding this property to hdfs-site.xml:[php]<property>

<name>dfs.replication</name>

<value>5</value>

<description>Block Replication</description>

</property>[/php]

You can also change the replication factor on per-file basis using the command:[php]hadoop fs –setrep –w 3 / file_location[/php]

You can also change replication factor for all the files in a directory by using:[php]hadoop fs –setrep –w 3 –R / directoey_location[/php]

Related questions

0 votes
Jan 11, 2020 in Big Data | Hadoop
0 votes
Feb 23, 2020 in Big Data | Hadoop
...