@SuppressWarnings("squid:S3776")
  void deserializeFileIntoChunkMetadataQueue(List<FileElement> fileElements)
      throws IOException, IllegalPathException {
    for (FileElement fileElement : fileElements) {
      TsFileResource resource = fileElement.resource;
      List<AbstractAlignedChunkMetadata> alignedChunkMetadataList =
          getAlignedChunkMetadataList(resource);

      if (alignedChunkMetadataList.isEmpty()) {
        // all chunks have been deleted in this file or current file does not contain this aligned
        // device, just remove it
        removeFile(fileElement);
      }

      // put aligned chunk metadatas into queue
      for (int i = 0; i < alignedChunkMetadataList.size(); i++) {
        chunkMetadataQueue.add(
            new ChunkMetadataElement(
                alignedChunkMetadataList.get(i),
                i == alignedChunkMetadataList.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/FastAlignedSeriesCompactionExecutor.java