Class CompactionUtils
- java.lang.Object
-
- org.apache.iotdb.db.engine.compaction.CompactionUtils
-
public class CompactionUtils extends java.lang.ObjectThis tool can be used to perform inner space or cross space compaction of aligned and non aligned timeseries.
-
-
Constructor Summary
Constructors Constructor Description CompactionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcombineModsInCrossCompaction(java.util.List<TsFileResource> seqResources, java.util.List<TsFileResource> unseqResources, java.util.List<TsFileResource> targetResources)Collect all the compaction modification files of source files, and combines them as the modification file of target file.static voidcombineModsInInnerCompaction(java.util.Collection<TsFileResource> sourceFiles, TsFileResource targetTsFile)Collect all the compaction modification files of source files, and combines them as the modification file of target file.static voiddeleteCompactionModsFile(java.util.List<TsFileResource> selectedSeqTsFileResourceList, java.util.List<TsFileResource> selectedUnSeqTsFileResourceList)static voiddeleteModificationForSourceFile(java.util.Collection<TsFileResource> sourceFiles, java.lang.String storageGroupName)Delete all modification files for source filesstatic booleandeleteTsFile(TsFileResource seqFile)static booleandeleteTsFilesInDisk(java.util.Collection<TsFileResource> mergeTsFiles, java.lang.String storageGroupName)static voidmoveTargetFile(java.util.List<TsFileResource> targetResources, boolean isInnerSpace, java.lang.String fullStorageGroupName)Update the targetResource.
-
-
-
Method Detail
-
moveTargetFile
public static void moveTargetFile(java.util.List<TsFileResource> targetResources, boolean isInnerSpace, java.lang.String fullStorageGroupName) throws java.io.IOException, org.apache.iotdb.tsfile.exception.write.WriteProcessException
Update the targetResource. Move tmp target file to target file and serialize xxx.tsfile.resource.- Throws:
java.io.IOExceptionorg.apache.iotdb.tsfile.exception.write.WriteProcessException
-
combineModsInCrossCompaction
public static void combineModsInCrossCompaction(java.util.List<TsFileResource> seqResources, java.util.List<TsFileResource> unseqResources, java.util.List<TsFileResource> targetResources) throws java.io.IOException
Collect all the compaction modification files of source files, and combines them as the modification file of target file.- Throws:
java.io.IOException
-
combineModsInInnerCompaction
public static void combineModsInInnerCompaction(java.util.Collection<TsFileResource> sourceFiles, TsFileResource targetTsFile) throws java.io.IOException
Collect all the compaction modification files of source files, and combines them as the modification file of target file.- Throws:
java.io.IOException
-
deleteCompactionModsFile
public static void deleteCompactionModsFile(java.util.List<TsFileResource> selectedSeqTsFileResourceList, java.util.List<TsFileResource> selectedUnSeqTsFileResourceList) throws java.io.IOException
- Throws:
java.io.IOException
-
deleteTsFilesInDisk
public static boolean deleteTsFilesInDisk(java.util.Collection<TsFileResource> mergeTsFiles, java.lang.String storageGroupName)
-
deleteTsFile
public static boolean deleteTsFile(TsFileResource seqFile)
-
deleteModificationForSourceFile
public static void deleteModificationForSourceFile(java.util.Collection<TsFileResource> sourceFiles, java.lang.String storageGroupName) throws java.io.IOException
Delete all modification files for source files- Throws:
java.io.IOException
-
-