@SuppressWarnings("checkstyle:LocalVariableNameCheck")
  void deserializeFileIntoChunkMetadataQueue(List<FileElement> fileElements)
      throws IOException, IllegalPathException {
    for (FileElement fileElement : fileElements) {
      TsFileResource resource = fileElement.resource;
      Pair<Long, Long> timeseriesMetadataOffset = timeseriesMetadataOffsetMap.get(resource);
      if (timeseriesMetadataOffset == null) {
        // tsfile does not contain this timeseries
        removeFile(fileElement);
        continue;
      }
      List<IChunkMetadata> iChunkMetadataList =
          readerCacheMap
              .get(resource)
              .getChunkMetadataListByTimeseriesMetadataOffset(
                  timeseriesMetadataOffset.left, timeseriesMetadataOffset.right);

      if (!iChunkMetadataList.isEmpty()) {
        // modify chunk metadatas
        ModificationUtils.modifyChunkMetaData(
            iChunkMetadataList,
            getModificationsFromCache(
                resource, deviceId, iChunkMetadataList.get(0).getMeasurementUid()));
        if (iChunkMetadataList.isEmpty()) {
          // all chunks has been deleted in this file, just remove it
          removeFile(fileElement);
        }
      }

      for (int i = 0; i < iChunkMetadataList.size(); i++) {
        IChunkMetadata chunkMetadata = iChunkMetadataList.get(i);

        // add into queue
        chunkMetadataQueue.add(
            new ChunkMetadataElement(
                chunkMetadata, i == iChunkMetadataList.size() - 1, fileElement));
      }
    }
  }
Deserialize files into chunk metadatas and put them into the chunk metadata queue.

@throws IOException if io errors occurred
@throws IllegalPathException if the file path is illegal
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/FastNonAlignedSeriesCompactionExecutor.java