Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop HDFS : Trash location

When and where, HDFS creates the .Trash folder ?

Does there any rule or logic, any reference ?

like image 649
54l3d Avatar asked Jan 02 '23 18:01

54l3d


1 Answers

Every HDFS user has their own .Trash folder on HDFS within hdfs:///user/<name>. The folder existance is checked and then created whenever hadoop fs -rm command gets executed by that user without a -skipTrash option.

This is purged on a schedule as per values of core-site.xml

  • fs.trash.interval
  • fs.trash.checkpoint.interval

By default, both are zero, so it is disabled and deleted files will therefore always be recoverable until manually cleared out by an HDFS administrator.

Also see this IBM post on HDFS Trash

like image 190
OneCricketeer Avatar answered Jan 09 '23 02:01

OneCricketeer