How to get the number of files from an HDFS directory using NiFi
My requirement is to retrieve the total number of files in a given HDFS directory and based on the number of files proceed with the downstream flow
I cannot use the ListHDFS processor as it does not allow inbound connections. The GetHDFSFileInfo processor generates flowfiles for each HDFS file, causing all downstream processors to execute the same number of times.
I have observed that we can use ExecuteStreamCommand to invoke a script and execute HDFS commands to get the number of files. I would like to know if we can obtain the count without using a script? Or if there is any other option available besides the above.

