How to empty trash on hadoop when namespace quota is exceeded? How to empty trash on hadoop when namespace quota is exceeded? hadoop hadoop

How to empty trash on hadoop when namespace quota is exceeded?


If I were you, I would follow the other answer...


If you really know what you are doing, then you could do:

[gsamaras@gwta3000 ~]$ hadoop fs -rm -f -r -skipTrash /path/to/dirToBeDeletedDeleted /path/to/dirToBeDeleted

which I assembled after reading: How to delete a non-empty directory in Terminal? and the rest..


When you delete a file or a directory, it goes into Trash, but when you delete Trash, there is an interval (that is configurable and depends on your setup, mine's is 1h), which has to pass by, so that the actual deletion occurs.

The idea is that you might delete something important (or something generated after much computing power is used) by accident and that configuration gives you the opportunity to recover your data.

If you are not sure how to proceed, then I would advice to wait for at least an hour and then try again, otherwise..


From that link, there is this list that proposes some ideas:

  1. Tell users to use -Dfs.trash.interval=0 when deleting largedirectory
  2. Exclude /user/<username>/.Trash from the quota
  3. Move .Trash out of /user directory. Maybe /Trash/<username>and set different quota.
  4. When -rm/rmr fail with quota, automatically delete them.
  5. Introduce a separate command that does (1). Something like -rmr-skipTrash for force delete.


It turns out I only needed to wait some hours, until everything settles down!