public void deleteInode ( RpcContext rpcContext , LockedInodePath inodePath , long opTimeMs ) throws FileDoesNotExistException { Preconditions . checkState ( inodePath . getLockPattern ( ) == LockPattern . WRITE_EDGE ) ; Inode inode = inodePath . getInode ( ) ; mState . applyAndJournal ( rpcContext , DeleteFileEntry . newBuilder ( ) . setId ( inode . getId ( ) ) . setRecursive ( false ) . setOpTimeMs ( opTimeMs ) . build ( ) ) ; if ( inode . isFile ( ) ) { rpcContext . getBlockDeletionContext ( ) . registerBlocksForDeletion ( inode . asFile ( ) . getBlockIds ( ) ) ; } }
Deletes a single inode from the inode tree by removing it from the parent inode .