Hadoop fs-rm -r

1. The Hadoop script invokes the Java class FsShell

2. Dfsclient.delete () call namenoderpcServer.delete ()

3. Namenoderpcserver.delete () call FSNamesystem. Delete ()

4 FSDirDeleteOp.delete()

5. Delete the target directory from the file system and then delete subdirectories

5.1

A. UnprotectedDelete: Deletes the namespace from the namespace.

B. FSN. RemoveSnapshottableDirs () : delete the snapshot

C. FSD. UpdateReplicationFactor () : update the replicate set node block

5.1.c Updates blocks on nodes of the replication set

5.2