We need to count the number of files in lots of directories in a multi-tenant multi-node Cluster with lots of amounts of Data. And so, I wonder from where the command "hdfs dfs -count /path/to/directory" gets its information? Does it work like a hdfs dfs -ls? Or it gets its information directly from the Namenode in the HDFS?
Thanks a lot!