How to find out all files with replication factor 1 in HDFS?
Posted on In QAHow to find out all files with replication factor 1 in HDFS?
The hdfs dfsadmin -report
shows there are blocks with replication factor 1:
Missing blocks (with replication factor 1): 7
How to find them out?
You can run hdfs fsck
to list all files with their replication counts and grep those with replication factor 1. Run the following command as a HDFS superuser:
$ hdfs fsck / -files -blocks -racks | grep repl=1