How to change an running HDFS cluster's replication factor?

Now, I have a running HDFS cluster storing lost files. I want to change its default replication factor.

How to change it? What will happen after it is changed?

For example, I change from 2 to 3. Will HDFS automatically re-replicate the data chunks?

asked Nov 11, 2014 by anonymous

1 Answer

First, the replication factor is client decided.

Second, the replication factor is per-file configuration.

Hence, the configuration only changes the client and takes effect for new files.

For existing files, you need to manually re-set the replication factor:

answered Nov 15, 2014 by Eric Z Ma (44,280 points)
How to check the replication factor of a file in HDFS? asked Nov 15, 2014 by Eric Z Ma (44,280 points)
edited Feb 1, 2015 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost