O'Reilly logo

Hadoop 2.x Administration Cookbook by Gurmukh Singh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recycle or trash bin configuration

There will also be cases where we need to restore an accidently deleted file or directory. This may be due to a user error or some archiving policy that cleans data periodically.

For such situations, we can configure the recycle bin so that the deleted files can be restored for a specified amount of time. In this recipe, we will see that this can be configured.

Getting ready

This recipe shows the steps needed to edit the configuration file and add new parameters to the file to enable trash in the Hadoop cluster.

How to do it...

  1. ssh to Namenode and edit the core-site.xml file to add the following property to it:
    <property>
    <name>fs.trash.interval</name>
    <value>10080</value>
    </property>
  2. The fs.trash.interval parameter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required