public static List<TsFileResource> getCrossCompactionTargetFileResources(
      List<TsFileResource> seqResources) throws IOException, DiskSpaceInsufficientException {
    List<TsFileResource> targetFileResources = new ArrayList<>();
    for (TsFileResource resource : seqResources) {
      TsFileName tsFileName = getTsFileName(resource.getTsFile().getName());
      tsFileName.setCrossCompactionCnt(tsFileName.getCrossCompactionCnt() + 1);
      // set target resource to COMPACTING until the end of this task
      targetFileResources.add(
          new TsFileResource(
              new File(
                  generateNewTsFilePathWithMkdir(
                      resource.isSeq(),
                      resource.getDatabaseName(),
                      resource.getDataRegionId(),
                      resource.getTimePartition(),
                      tsFileName.time,
                      tsFileName.version,
                      tsFileName.innerCompactionCnt,
                      tsFileName.crossCompactionCnt,
                      resource.getTierLevel(),
                      IoTDBConstant.CROSS_COMPACTION_TMP_FILE_SUFFIX)),
              TsFileResourceStatus.COMPACTING));
    }
    return targetFileResources;
  }
Create tmp target file for cross space compaction, in which each sequence source file has its
own tmp target file.

@param seqResources
@return tmp target file list, which is xxx.cross
@throws IOException
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/generator/TsFileNameGenerator.java