protected List<AbstractAlignedChunkMetadata> getAlignedChunkMetadataList(TsFileResource resource)
      throws IOException, IllegalPathException {
    // read time chunk metadatas and value chunk metadatas in the current file
    List<IChunkMetadata> timeChunkMetadatas = null;
    List<List<IChunkMetadata>> valueChunkMetadatas = new ArrayList<>();
    for (Map.Entry<String, Map<TsFileResource, Pair<Long, Long>>> entry :
        timeseriesMetadataOffsetMap.entrySet()) {
      String measurementID = entry.getKey();
      Pair<Long, Long> timeseriesOffsetInCurrentFile = entry.getValue().get(resource);
      if (measurementID.equals("")) {
        // read time chunk metadatas
        if (timeseriesOffsetInCurrentFile == null) {
          // current file does not contain this aligned device
          timeChunkMetadatas = null;
          break;
        }
        timeChunkMetadatas =
            readerCacheMap
                .get(resource)
                .getChunkMetadataListByTimeseriesMetadataOffset(
                    timeseriesOffsetInCurrentFile.left, timeseriesOffsetInCurrentFile.right);
      } else {
        // read value chunk metadatas
        if (timeseriesOffsetInCurrentFile == null) {
          // current file does not contain this aligned timeseries
          valueChunkMetadatas.add(null);
        } else {
          // current file contains this aligned timeseries
          List<IChunkMetadata> valueColumnChunkMetadataList =
              readerCacheMap
                  .get(resource)
                  .getChunkMetadataListByTimeseriesMetadataOffset(
                      timeseriesOffsetInCurrentFile.left, timeseriesOffsetInCurrentFile.right);
          if (isValueChunkDataTypeMatchSchema(valueColumnChunkMetadataList)) {
            valueChunkMetadatas.add(valueColumnChunkMetadataList);
          } else {
            valueChunkMetadatas.add(null);
          }
        }
      }
    }

    List<AbstractAlignedChunkMetadata> alignedChunkMetadataList = new ArrayList<>();
    // if current file contains this aligned device,then construct aligned chunk metadatas
    if (timeChunkMetadatas != null) {
      for (int i = 0; i < timeChunkMetadatas.size(); i++) {
        List<IChunkMetadata> valueChunkMetadataList = new ArrayList<>();
        for (List<IChunkMetadata> chunkMetadata : valueChunkMetadatas) {
          if (chunkMetadata == null) {
            valueChunkMetadataList.add(null);
          } else {
            valueChunkMetadataList.add(chunkMetadata.get(i));
          }
        }
        AbstractAlignedChunkMetadata alignedChunkMetadata =
            ignoreAllNullRows
                ? new AlignedChunkMetadata(timeChunkMetadatas.get(i), valueChunkMetadataList)
                : new TableDeviceChunkMetadata(timeChunkMetadatas.get(i), valueChunkMetadataList);

        alignedChunkMetadataList.add(alignedChunkMetadata);
      }

      // get time modifications of this file
      List<ModEntry> timeModifications =
          getModificationsFromCache(resource, deviceId, AlignedPath.VECTOR_PLACEHOLDER);
      // get value modifications of this file
      List<List<ModEntry>> valueModifications = new ArrayList<>();
      alignedChunkMetadataList
          .get(0)
          .getValueChunkMetadataList()
          .forEach(
              x -> {
                try {
                  if (x == null) {
                    valueModifications.add(null);
                  } else {
                    valueModifications.add(
                        getModificationsFromCache(resource, deviceId, x.getMeasurementUid()));
                  }
                } catch (IllegalPathException e) {
                  throw new RuntimeException(e);
                }
              });

      // modify aligned chunk metadatas
      ModificationUtils.modifyAlignedChunkMetaData(
          alignedChunkMetadataList, timeModifications, valueModifications, ignoreAllNullRows);
    }
    return alignedChunkMetadataList;
  }
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