Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xman1980/2b83b55a4e8a217227694bfd95ef0f5b to your computer and use it in GitHub Desktop.
Save xman1980/2b83b55a4e8a217227694bfd95ef0f5b to your computer and use it in GitHub Desktop.
HdfsFindTool
If you happen to be using CDH distribution of Hadoop, it comes with a very useful HdfsFindTool command, which behaves like Linux's find command.
If you're using the default parcels information, here's how you'd do it:
hadoop jar /opt/cloudera/parcels/CDH/jars/search-mr-*-job.jar \
org.apache.solr.hadoop.HdfsFindTool -find PATH -mtime +N
Where you'd replace PATH with the search path and N with number of days.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment