Honain Khan
Honain Khan

Reputation: 93

Selectively Delete Content From Hadoop Trash

Hadoop periodically deletes the content from Trash based on fs.trash.interval Also user can trigger the delete by expunge command but that would only delete files that are older than the interval. What if I want to selectively delete certain large files rom Trash to recover space. What are the disadvantages of doing this?

Upvotes: 3

Views: 4789

Answers (1)

Vikas Hardia
Vikas Hardia

Reputation: 2695

For selective delete from Hadoop there are two creative ways

First

Delete the file completely or skip the Trash for the files you want to delete for that use below command

hadoop fs -rm -R -skipTrash /folder-path

Second

Recover the file from Trash you want to keep Empty the trash that will make some space for you.

hadoop fs -expunge

Upvotes: 3

Related Questions