public static List<TsFileResource> getNewInnerCompactionTargetFileResources(
      List<TsFileResource> tsFileResources, boolean sequence)
      throws IOException, DiskSpaceInsufficientException {
    long maxInnerCompactionCount = Long.MIN_VALUE;
    long maxCrossMergeCount = Long.MIN_VALUE;
    int maxTierLevel = 0;
    for (TsFileResource resource : tsFileResources) {
      TsFileName tsFileName = getTsFileName(resource.getTsFile().getName());
      maxInnerCompactionCount = Math.max(tsFileName.innerCompactionCnt, maxInnerCompactionCount);
      maxCrossMergeCount = Math.max(tsFileName.crossCompactionCnt, maxCrossMergeCount);
      maxTierLevel = Math.max(resource.getTierLevel(), maxTierLevel);
    }
    List<TsFileResource> targetResources = new ArrayList<>(tsFileResources.size());
    for (TsFileResource resource : tsFileResources) {
      TsFileName tsFileName = getTsFileName(resource.getTsFile().getName());
      TsFileResource targetResource =
          new TsFileResource(
              new File(
                  generateNewTsFilePathWithMkdir(
                      sequence,
                      tsFileResources.get(0).getDatabaseName(),
                      tsFileResources.get(0).getDataRegionId(),
                      tsFileResources.get(0).getTimePartition(),
                      tsFileName.time,
                      tsFileName.version,
                      (int) maxInnerCompactionCount + 1,
                      (int) maxCrossMergeCount,
                      maxTierLevel,
                      IoTDBConstant.INNER_COMPACTION_TMP_FILE_SUFFIX)),
              TsFileResourceStatus.COMPACTING);
      targetResource.setSeq(sequence);
      targetResources.add(targetResource);
    }
    return targetResources;
  }
Create tmp target file for inner space compaction, in which all source files has only one tmp
target file.

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