Class AbstractCompactionEstimator

  • Direct Known Subclasses:
    AbstractCrossSpaceEstimator, AbstractInnerSpaceEstimator

    public abstract class AbstractCompactionEstimator
    extends java.lang.Object
    Estimate the memory cost of one compaction task with specific source files based on its corresponding implementation.
    • Field Detail

      • fileReaderCache

        protected java.util.Map<TsFileResource,​org.apache.iotdb.tsfile.read.TsFileSequenceReader> fileReaderCache
    • Constructor Detail

      • AbstractCompactionEstimator

        public AbstractCompactionEstimator()
    • Method Detail

      • estimateCrossCompactionMemory

        public abstract long estimateCrossCompactionMemory​(java.util.List<TsFileResource> seqResources,
                                                           TsFileResource unseqResource)
                                                    throws java.io.IOException
        Estimate the memory cost of compacting the unseq file and its corresponding overlapped seq files in cross space compaction task.
        Throws:
        java.io.IOException
      • estimateInnerCompactionMemory

        public abstract long estimateInnerCompactionMemory​(java.util.List<TsFileResource> resources)
        Estimate the memory cost of compacting the source files in inner space compaction task.
      • getFileReader

        protected org.apache.iotdb.tsfile.read.TsFileSequenceReader getFileReader​(TsFileResource tsFileResource)
                                                                           throws java.io.IOException
        Construct a new or get an existing TsFileSequenceReader of a TsFile.
        Throws:
        java.io.IOException
      • clear

        public void clear()
                   throws java.io.IOException
        Throws:
        java.io.IOException