public synchronized void closeAndRemoveAllOpenedReaders() throws IOException {
    Iterator<Map.Entry<String, TsFileSequenceReader>> iterator =
        closedFileReaderMap.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String, TsFileSequenceReader> entry = iterator.next();
      entry.getValue().close();
      if (resourceLogger.isDebugEnabled()) {
        resourceLogger.debug("{} closedTsFileReader is closed.", entry.getKey());
      }
      closedReferenceMap.remove(entry.getKey());
      iterator.remove();
    }
    iterator = unclosedFileReaderMap.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String, TsFileSequenceReader> entry = iterator.next();
      entry.getValue().close();
      if (resourceLogger.isDebugEnabled()) {
        resourceLogger.debug("{} unclosedTsFileReader is closed.", entry.getKey());
      }
      unclosedReferenceMap.remove(entry.getKey());
      iterator.remove();
    }
  }
Only for <code>EnvironmentUtils.cleanEnv</code> method. To make sure that unit tests and
integration tests will not conflict with each other.

@throws IOException if failed to close file handlers, IOException will be thrown
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/control/FileReaderManager.java