Yes, that’s correct behavior. You remove the file, but snapshot is there and it has ref for that file, so the blocks will not be removed. Only after you delete all snapshots and original file, then blocks are removed.
Keep in mind that blocks in datanodes are not copied for snapshot. Regards, Yi Liu From: juil cho [mailto:[email protected]] Sent: Wednesday, August 20, 2014 2:23 PM To: [email protected] Subject: Why not remove the block on the disk if the snapshot? hadoop version 2.4.1. I have tested the snapshot. 1. upload file, /tmp/test.avi 2. create snapshot, /tmp snap1 3. delete file, /tmp/test.avi 4. moved to the Trash, /user/hadoop/.Trash/tmp/test.avi 5. file deleted in trash. 6. but, blocks is not deleted in datanode disk. why?? 7. delete snapshot(snap1) 8. blocks is deleted in datanode disk. why??? I do not understand. Why not remove the block on the disk if the snapshot? [http://mail.naver.com/readReceipt/notify/?img=AlFZ1zFdMrYsbrJR%2BHFGhziCFqvZpo%2B0FrKdMrulFxudK4u%2FKoK9Fq2%2FMrMqp6UZtzFXp6UwFZl5WLl51zlqDBFdp6d5MreRhoR9brkZtzCCpzeTbVlCbzJo1zE5WXiN.gif]
