HOWTO: Change replication factor of existing files in HDFS
December 23, 2008
There are references around the web regarding changing the replication factor on a running Hadoop system. For example, if you don’t have even distribution of blocks across your Datanodes, you can increase replication temporarily and then bring it back down.
To set replication of an individual file to 4:
./bin/hadoop dfs -setrep -w 4 /path/to/file
You can also do this recursively. To change replication of entire HDFS to 1:
./bin/hadoop dfs -setrep -R -w 1 /
January 3, 2009 at 4:54 pm
[...] HOWTO: Change replication factor of existing files in HDFS [...]