private void init(
      List<TsFileResource> seqFiles,
      List<TsFileResource> unseqFiles,
      CompactionScheduleContext context) {
    this.context = context;
    this.seqFiles = copySeqResource(seqFiles);
    // it is necessary that unseqFiles are all available
    this.unseqFiles = filterUnseqResource(unseqFiles);
    this.nextUnseqFileIndex = 0;
  }
CrossSpaceCompactionResource manages files and caches of readers to avoid unnecessary object
creations and file openings.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/utils/CrossSpaceCompactionCandidate.java