public static List<IFullPath> getAllPathsOfResources(List<TsFileResource> resources)
      throws IOException, IllegalPathException {
    Set<IFullPath> paths = new HashSet<>();
    try (MultiTsFileDeviceIterator deviceIterator = new MultiTsFileDeviceIterator(resources)) {
      while (deviceIterator.hasNextDevice()) {
        Pair<IDeviceID, Boolean> iDeviceIDBooleanPair = deviceIterator.nextDevice();
        IDeviceID deviceID = iDeviceIDBooleanPair.getLeft();
        boolean isAlign = iDeviceIDBooleanPair.getRight();
        Map<String, MeasurementSchema> schemaMap = deviceIterator.getAllSchemasOfCurrentDevice();
        IMeasurementSchema timeSchema = schemaMap.remove(TsFileConstant.TIME_COLUMN_ID);
        List<IMeasurementSchema> measurementSchemas = new ArrayList<>(schemaMap.values());
        if (measurementSchemas.isEmpty()) {
          continue;
        }
        List<String> existedMeasurements =
            measurementSchemas.stream()
                .map(IMeasurementSchema::getMeasurementName)
                .collect(Collectors.toList());
        IFullPath seriesPath;
        if (isAlign) {
          seriesPath = new AlignedFullPath(deviceID, existedMeasurements, measurementSchemas);
        } else {
          seriesPath = new NonAlignedFullPath(deviceID, measurementSchemas.get(0));
        }
        paths.add(seriesPath);
      }
    }
    return new ArrayList<>(paths);
  }
Using SeriesRawDataBatchReader to read raw data from files, and return it as a map.

@param sequenceResources
@param unsequenceResources
@return
@throws IllegalPathException
@throws IOException
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/compaction/utils/CompactionCheckerUtils.java