change replicas hdfs code example
Example 1: change replication factor hadoop cluster command
-D dfs.replication=1
Example 2: change replication factor hadoop cluster command
hdfs dfs –setrep –w 3 /user/hdfs/file.txt
Example 3: change replication factor hadoop cluster command
hdfs dfs -setrep -R 2 /user/hdfs/test