static CompactionTaskMetadataInfo collectMetadataInfoFromCachedFileInfo(
      List<TsFileResource> resources,
      Map<TsFileResource, FileInfo.RoughFileInfo> cachedFileInfo,
      boolean hasConcurrentSubTask) {
    CompactionTaskMetadataInfo metadataInfo = new CompactionTaskMetadataInfo();
    for (TsFileResource resource : resources) {
      metadataInfo.metadataMemCost += resource.getTotalModSizeInByte();
      long maxMemToReadAlignedSeries = cachedFileInfo.get(resource).maxMemToReadAlignedSeries;
      long maxMemToReadNonAlignedSeries = cachedFileInfo.get(resource).maxMemToReadNonAlignedSeries;
      metadataInfo.metadataMemCost +=
          Math.max(
              maxMemToReadAlignedSeries,
              maxMemToReadNonAlignedSeries
                  * (hasConcurrentSubTask
                      ? IoTDBDescriptor.getInstance().getConfig().getSubCompactionTaskNum()
                      : 1));
      if (maxMemToReadAlignedSeries > 0) {
        metadataInfo.hasAlignedSeries = true;
      }
    }
    return metadataInfo;
  }
Get the details of the tsfile, the returned array contains the following elements in sequence:

<p>total chunk num in this tsfile

<p>max chunk num of one timeseries in this tsfile

<p>max aligned series num in one device. If there is no aligned series in this file, then it
turns to be -1.

<p>max chunk num of one device in this tsfile

@throws IOException if io errors occurred
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/CompactionEstimateUtils.java