Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this topic

Replication factor not changed in HDFS from hdfs-site.xml

avatar
New Member

I was facing failed to replace bad datanode error while appending new data to file and the work around was to set dfs.replication to less than 3 , so I set it to 1 just to test it. But I still got the same error. I looked at the hadoop web interface and surprisingly the replication factor was still 3 . but when I did hdfs dfs -setrep 1 <file_name> the replication is set to 1 and I could append to file. Why is this happening? Can I not set default replication factor ? I tried formating namenode still no change.

Here's my hdfs-site.xml

<configuration>
<property>
  <name>dfs.replication</name>
  <value>1</value>
</property>

<property>
  <name>dfs.permissions</name>
  <value>false</value>
</property>

  <property> 
    <name>dfs.support.append</name>
    <value>true</value> 
</property>
</configuration>

I tried to follow steps from this question, still my replication factor is 3. I am running hadoop in single node cluster.

Who agreed with this topic