public void analyze() throws IOException, IllegalArgumentException {
    try (BufferedReader bufferedReader = new BufferedReader(new FileReader(logFile))) {
      String currLine;
      while ((currLine = bufferedReader.readLine()) != null) {
        final String lineValue = currLine;
        String fileInfo;
        if (currLine.startsWith(STR_SOURCE_FILES)) {
          fileInfo = currLine.replaceFirst(STR_SOURCE_FILES + TsFileIdentifier.INFO_SEPARATOR, "");
          sourceFileInfos.add(TsFileIdentifier.getFileIdentifierFromInfoString(fileInfo));
        } else if (currLine.startsWith(STR_TARGET_FILES)) {
          fileInfo = currLine.replaceFirst(STR_TARGET_FILES + TsFileIdentifier.INFO_SEPARATOR, "");
          targetFileInfos.add(TsFileIdentifier.getFileIdentifierFromInfoString(fileInfo));
        } else if (currLine.startsWith(STR_DELETED_TARGET_FILES)) {
          fileInfo =
              currLine.replaceFirst(STR_DELETED_TARGET_FILES + TsFileIdentifier.INFO_SEPARATOR, "");
          deletedTargetFileInfos.add(TsFileIdentifier.getFileIdentifierFromInfoString(fileInfo));
        } else if (Stream.of(CompactionTaskStage.values())
            .anyMatch(stage -> lineValue.startsWith(stage.name()))) {
          taskStage = CompactionTaskStage.valueOf(currLine);
        } else {
          throw new IllegalArgumentException(
              String.format("unknown compaction log line: %s", currLine));
        }
      }
    }
  }
analyze (source files, target files, deleted target files).
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/log/CompactionLogAnalyzer.java