1. allow snapshots under dir /foo
2. create a file /foo/test/bar and start writing to it
3. create a snapshot s1 under /foo after block is allocated and some data has been written to it
4. Delete the directory /foo/test
5. wait till checkpoint or do saveNameSpace
6. restart NN.
NN enters to safemode.
Snapshot nodes loaded from fsimage are always complete and all blocks will be in COMPLETE state.
So when the Datanode reports RBW blocks those will not be updated in blocksmap.
Some of the FINALIZED blocks will be marked as corrupt due to length mismatch.