Class RewriteCrossSpaceCompactionSelector
- java.lang.Object
-
- org.apache.iotdb.db.engine.compaction.cross.rewrite.RewriteCrossSpaceCompactionSelector
-
- All Implemented Interfaces:
ICrossSpaceSelector,ICompactionSelector
public class RewriteCrossSpaceCompactionSelector extends java.lang.Object implements ICrossSpaceSelector
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringdataRegionIdprotected java.lang.StringlogicalStorageGroupNameprotected longtimePartitionprotected TsFileManagertsFileManager
-
Constructor Summary
Constructors Constructor Description RewriteCrossSpaceCompactionSelector(java.lang.String logicalStorageGroupName, java.lang.String dataRegionId, long timePartition, TsFileManager tsFileManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Long>getCompactionMemoryCost()java.util.ListselectCrossSpaceTask(java.util.List<TsFileResource> sequenceFileList, java.util.List<TsFileResource> unsequenceFileList)This method creates a specific file selector according to the file selection strategy of crossSpace compaction, uses the file selector to select all unseqFiles and seqFiles to be compacted under the time partition of the virtual storage group, and creates a compaction task for them.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iotdb.db.engine.compaction.task.ICompactionSelector
selectInnerSpaceTask
-
-
-
-
Field Detail
-
logicalStorageGroupName
protected java.lang.String logicalStorageGroupName
-
dataRegionId
protected java.lang.String dataRegionId
-
timePartition
protected long timePartition
-
tsFileManager
protected TsFileManager tsFileManager
-
-
Constructor Detail
-
RewriteCrossSpaceCompactionSelector
public RewriteCrossSpaceCompactionSelector(java.lang.String logicalStorageGroupName, java.lang.String dataRegionId, long timePartition, TsFileManager tsFileManager)
-
-
Method Detail
-
selectCrossSpaceTask
public java.util.List selectCrossSpaceTask(java.util.List<TsFileResource> sequenceFileList, java.util.List<TsFileResource> unsequenceFileList)
This method creates a specific file selector according to the file selection strategy of crossSpace compaction, uses the file selector to select all unseqFiles and seqFiles to be compacted under the time partition of the virtual storage group, and creates a compaction task for them. The task is put into the compactionTaskQueue of theCompactionTaskManager.- Specified by:
selectCrossSpaceTaskin interfaceICompactionSelector- Specified by:
selectCrossSpaceTaskin interfaceICrossSpaceSelector- Returns:
- Returns whether the file was found and submits the merge task
-
getCompactionMemoryCost
public java.util.List<java.lang.Long> getCompactionMemoryCost()
- Specified by:
getCompactionMemoryCostin interfaceICompactionSelector
-
-