Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Managing Hadoop > Enabling trash

8.5. Enabling trash

In addition to file permissions, an additional safeguard against accidental deletion of files in HDFS is the trash feature. By default this feature is disabled. When this feature is enabled, the command line utilities for deleting files don’t delete files immediately. Instead, they move the files temporarily to a. Trash/folder under the user’s working directory. The files are not permanently removed until after a user-configurable time delay. As long as a file is still in the. Trash/folder, you can restore it by moving it back to its original location.

To enable the trash feature and set the time delay for the trash removal, set the fs.trash.interval property in core-site.xml to the delay (in minutes). For example, if you want users to have 24 hours (1,440 minutes) to restore a deleted file, you should have in core-site.xml


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint