Skip to content

Instantly share code, notes, and snippets.

@erasmas
Created December 29, 2014 09:43
Show Gist options
  • Save erasmas/b8002b78b2dd51e183ed to your computer and use it in GitHub Desktop.
Save erasmas/b8002b78b2dd51e183ed to your computer and use it in GitHub Desktop.
List all files in HDFS given a glob pattern
(let [fs (FileSystem/getLocal (Configuration.))
path (Path. "/data/in/*.txt.gz")]
(map #(.getPath %) (.globStatus fs path)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment