private void releaseAllBlocks ( ) throws IOException { synchronized ( m_accessLock ) { Set < Map . Entry < BlockId , Path > > entries = m_blockPathMap . entrySet ( ) ; while ( ! entries . isEmpty ( ) ) { Map . Entry < BlockId , Path > entry = entries . iterator ( ) . next ( ) ; Files . delete ( entry . getValue ( ) ) ; m_blockPathMap . remove ( entry . getKey ( ) ) ; entries = m_blockPathMap . entrySet ( ) ; } } }
Release all the blocks that are on disk and delete them from the map that tracks them .