The hdfs-site.xml file is used to configure HDFS. Changing the dfs.replication property to hdfs- site.xml changes the default replication for all files stored in HDFS. The replication factor on a per-file basis can also be changed as follows.   Hadoop FS Shell:[training@localhost ~]$ hadoopfs –setrep –w 3 /my/fileConversely,  The replication factor of all the files under a directory can also be changed.  [training@localhost ~]$ hadoopfs –setrep –w 3 -R /my/dir