How to find out all files with replication factor 1 in HDFS?

How 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?

asked Aug 7 by anonymous

1 Answer

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
answered Aug 13 by Eric Z Ma (43,500 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...