0 votes
in HDFS by

Can we have different replication factor of the existing files in HDFS?

1 Answer

0 votes
by

Yes, one can have different replication factor for the files existing in HDFS. Suppose, I have a file named test.xml stored within the sample directory in my HDFS with the replication factor set to 1. Now, the command for changing the replication factor of text.xml file to 3 is:

hadoop fs -setrwp -w 3 /sample/test.xml

Finally, I can check whether the replication factor has been changed or not by using following command:

hadoop fs -ls /sample

or 

hadoop fsck /sample/test.xml -files

Related questions

0 votes
asked Jan 11, 2020 in Big Data | Hadoop by rajeshsharma
0 votes
asked Jan 11, 2020 in Big Data | Hadoop by rajeshsharma
...