Remove trash folder from hdfs

bigdatalabs

#1

Hello

I am using labs,and when i delete data from hdfs ,I see it move to the trash directory
I understand i can use the --skipTrash option

But if i don’t use it,Should i explicitly delete contents from trash
example from hdfs://nn01.itversity.com:8020/user/username/.Trash/Current/user/username
or do you have a process in place for cleanup?


#2

@itversity Can someone from the labs team please respond to my above query?


#3

Hi @vm109

Once you have deleted your files from HDFS, then those deleted files will be moved to trash. I’m pretty sure that itversity Hadoop administrators has setup trash ‘expunge’ policy, if not this is by default set to 360 minutes. Once you have performed delete, it’s not your activity to take care of it from trash. it will handled by Hadoop automatically.

otherwise you can use below command to expunge in manually:

hadoop fs -expunge