Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Recursively list all HDFS directories with WEBHDFS?


I know about, but not quite getting what I want. The problem is, for downtimes, hadoop fs -ls -R takes way too long. I was hoping webhdfs could produce the same.


Expert Contributor

LISTSTATUS_BATCH is not for recursive listing, but for "iterative" listing. It means that WebHDFS will return the list (of files in the given directory) in ( sized) parts. It won't list the files of the subdirectories.

Unfortunately hdfs dfs -ls -R is most likely your fastest option, if you really would like to print your whole filesystem.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.