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.