Class TsFileNameGenerator


  • public class TsFileNameGenerator
    extends java.lang.Object
    • Constructor Detail

      • TsFileNameGenerator

        public TsFileNameGenerator()
    • Method Detail

      • generateNewTsFilePath

        public static java.lang.String generateNewTsFilePath​(java.lang.String tsFileDir,
                                                             long time,
                                                             long version,
                                                             int innerSpaceCompactionCount,
                                                             int crossSpaceCompactionCount)
      • generateNewTsFilePathWithMkdir

        public static java.lang.String generateNewTsFilePathWithMkdir​(boolean sequence,
                                                                      java.lang.String logicalStorageGroup,
                                                                      java.lang.String virtualStorageGroup,
                                                                      long timePartitionId,
                                                                      long time,
                                                                      long version,
                                                                      int innerSpaceCompactionCount,
                                                                      int crossSpaceCompactionCount)
                                                               throws DiskSpaceInsufficientException
        Throws:
        DiskSpaceInsufficientException
      • generateNewTsFileName

        public static java.lang.String generateNewTsFileName​(long time,
                                                             long version,
                                                             int innerSpaceCompactionCount,
                                                             int crossSpaceCompactionCount)
      • getTsFileName

        public static TsFileNameGenerator.TsFileName getTsFileName​(java.lang.String fileName)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • increaseCrossCompactionCnt

        public static TsFileResource increaseCrossCompactionCnt​(TsFileResource tsFileResource)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • increaseInnerCompactionCnt

        public static TsFileResource increaseInnerCompactionCnt​(TsFileResource tsFileResource)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • increaseCrossCompactionCnt

        public static java.io.File increaseCrossCompactionCnt​(java.io.File tsFile)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getCrossCompactionTargetFileResources

        public static java.util.List<TsFileResource> getCrossCompactionTargetFileResources​(java.util.List<TsFileResource> seqResources)
                                                                                    throws java.io.IOException
        Create tmp target file for cross space compaction, in which each sequence source file has its own tmp target file.
        Parameters:
        seqResources -
        Returns:
        tmp target file list, which is xxx.cross
        Throws:
        java.io.IOException
      • getInnerCompactionTargetFileResource

        public static TsFileResource getInnerCompactionTargetFileResource​(java.util.List<TsFileResource> tsFileResources,
                                                                          boolean sequence)
                                                                   throws java.io.IOException
        Create tmp target file for inner space compaction, in which all source files has only one tmp target file.
        Parameters:
        tsFileResources -
        sequence -
        Returns:
        tmp target file, which is xxx.target
        Throws:
        java.io.IOException