This is the documentation for Cloudera Manager 4.8.6. Documentation for other versions is available at Cloudera Documentation.

Cloudera Manager 4 and CDH 4 have reached End of Maintenance (EOM) on August 9, 2015. Cloudera will not support or provide patches for any of the Cloudera Manager 4 or CDH 4 releases after that date.

HDFS Trash Folder

The Hadoop trash feature helps prevent accidental deletion of files and directories. If trash is enabled and a file or directory is deleted using the Hadoop shell, the file is moved to the .Trash directory in the user's home directory instead of being deleted. Deleted files are initially moved to the Current sub-directory of the .Trash directory, and their original path is preserved. Files in .Trash are permanently removed after a user-configurable time interval. The interval setting also enables trash checkpointing, where the Current directory is periodically renamed using a timestamp. Files and directories in the trash can be restored simply by moving them to a location outside the .Trash directory.

Enabling and Disabling Trash

  1. Go to the HDFS service.
  2. Select Configuration > View and Edit.
  3. Click the Gateway Default Group category.
  4. Check or uncheck the Use Trash checkbox.
  5. Click the Save Changes button.
  6. Restart the HDFS service.

Setting the Trash Interval

  1. Go to the HDFS service.
  2. Select Configuration > View and Edit.
  3. Click the NameNode Default Group category.
  4. Specify the Filesystem Trash Interval property, which controls the number of minutes after which a trash checkpoint directory is deleted and the number of minutes between trash checkpoints. For example, to enable trash so that deleted files are deleted after 24 hours, set the value of the Filesystem Trash Interval property to 1440.
      Note: The trash interval is measured from the point at which the files are moved to trash, not from the last time the files were modified.
  5. Click the Save Changes button.
  6. Restart the HDFS service.
This page last updated September 8, 2015