INode delete ( String src , INode [ ] inodes , List < BlockInfo > collectedBlocks , int blocksLimit ) { if ( NameNode . stateChangeLog . isDebugEnabled ( ) ) { NameNode . stateChangeLog . debug ( "DIR* FSDirectory.delete: " + src ) ; } waitForReady ( ) ; long now = FSNamesystem . now ( ) ; INode deletedNode = unprotectedDelete ( src , inodes , collectedBlocks , blocksLimit , now ) ; if ( deletedNode != null ) { fsImage . getEditLog ( ) . logDelete ( src , now ) ; } return deletedNode ; }
Remove the file from management return up to blocksLimit number of blocks