public static boolean compareSourceDataAndTargetData(
      Map<IFullPath, List<TimeValuePair>> source, Map<IFullPath, List<TimeValuePair>> target) {
    for (Entry<IFullPath, List<TimeValuePair>> entry : target.entrySet()) {
      IFullPath path = entry.getKey();
      List<TimeValuePair> sourceList = source.get(path);
      List<TimeValuePair> targetList = entry.getValue();
      int sourceIndex = 0;
      for (int i = 0; i < targetList.size(); i++) {
        TimeValuePair currentTargetTimeValuePair = targetList.get(i);
        TimeValuePair currentSourceTimeValuePair = sourceList.get(sourceIndex);
        if (!compareTimeValuePair(currentSourceTimeValuePair, currentTargetTimeValuePair)) {
          System.out.println(currentSourceTimeValuePair);
          System.out.println(currentTargetTimeValuePair);
          return false;
        }
        sourceIndex++;
      }
    }
    return true;
  }
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