Very interesting article on Replication Factors in HDFS.
Replication is the process of storing copies of data on multiple nodes to ensure reliability and fault tolerance.
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 /