0 votes
in HDFS by
What is the default replication factor and how will you change it?

1 Answer

0 votes
by

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

+1 vote
asked Jan 31, 2020 in Cassandra by MBarbieri
0 votes
asked Jan 11, 2020 in Big Data | Hadoop by rajeshsharma
...