Class TsFileNameGenerator
- java.lang.Object
-
- org.apache.iotdb.db.engine.storagegroup.TsFileNameGenerator
-
public class TsFileNameGenerator extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTsFileNameGenerator.TsFileName
-
Constructor Summary
Constructors Constructor Description TsFileNameGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgenerateNewTsFileName(long time, long version, int innerSpaceCompactionCount, int crossSpaceCompactionCount)static java.lang.StringgenerateNewTsFilePath(java.lang.String tsFileDir, long time, long version, int innerSpaceCompactionCount, int crossSpaceCompactionCount)static java.lang.StringgenerateNewTsFilePathWithMkdir(boolean sequence, java.lang.String logicalStorageGroup, java.lang.String virtualStorageGroup, long timePartitionId, long time, long version, int innerSpaceCompactionCount, int crossSpaceCompactionCount)static java.lang.StringgenerateTsFileDir(boolean sequence, java.lang.String logicalStorageGroup, java.lang.String virtualStorageGroup, long timePartitionId)static java.util.List<TsFileResource>getCrossCompactionTargetFileResources(java.util.List<TsFileResource> seqResources)Create tmp target file for cross space compaction, in which each sequence source file has its own tmp target file.static TsFileResourcegetInnerCompactionTargetFileResource(java.util.List<TsFileResource> tsFileResources, boolean sequence)Create tmp target file for inner space compaction, in which all source files has only one tmp target file.static TsFileNameGenerator.TsFileNamegetTsFileName(java.lang.String fileName)static java.io.FileincreaseCrossCompactionCnt(java.io.File tsFile)static TsFileResourceincreaseCrossCompactionCnt(TsFileResource tsFileResource)static TsFileResourceincreaseInnerCompactionCnt(TsFileResource tsFileResource)
-
-
-
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
-
generateTsFileDir
public static java.lang.String generateTsFileDir(boolean sequence, java.lang.String logicalStorageGroup, java.lang.String virtualStorageGroup, long timePartitionId) 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
-
-