How to set the data replication factor of Hadoop HDFS?

Posted on In QA

How to set the data replication factor of Hadoop HDFS in Hadoop 2 (YARN)?

The default replication factor in HDFS is controlled by the dfs.replication property.

The value is 3 by default.

To change the replication factor, you can add a dfs.replication property settings in the hdfs-site.xml configuration file of Hadoop:

<property>
    <name>dfs.replication</name>
    <value>1</value>
    <description>Replication factor.</description>
</property>

The above one make the default replication factor 1.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *