How do you retrieve the replication factor info in Hdfs files?
I have set the replication factor for my file as follows: hadoop fs -D dfs.replication=5 -copyFromLocal file.txt /user/xxxx When a NameNode restarts, it makes sure under-replicated blocks are replicated. Hence the replication info for the file is stored (possibly in nameNode ). How can I get that information? Try to use command hadoop fs -stat %r /path/to/file , it should print the replication factor. You can run following command to get replication factor, hadoop fs -ls /user/xxxx The second column in the output signify replication factor for the file and for the folder it shows - , as shown