Interface IChunkWriter

    • Method Detail

      • writeToFileWriter

        void writeToFileWriter​(TsFileIOWriter tsfileWriter)
                        throws java.io.IOException
        flush data to TsFileIOWriter.
        Throws:
        java.io.IOException
      • estimateMaxSeriesMemSize

        long estimateMaxSeriesMemSize()
        estimate memory usage of this series.
      • getSerializedChunkSize

        long getSerializedChunkSize()
        return the serialized size of the chunk header + all pages (not including the un-sealed page). Notice, call this method before calling writeToFileWriter(), otherwise the page buffer in memory will be cleared.
        If there is no data points in the chunk, return 0 (i.e., in this case, the size of header is not calculated, because nothing will be serialized latter)
      • sealCurrentPage

        void sealCurrentPage()
        seal the current page which may has not enough data points in force.
      • clearPageWriter

        void clearPageWriter()
        set the current pageWriter to null, friendly for gc
      • checkIsChunkSizeOverThreshold

        boolean checkIsChunkSizeOverThreshold​(long size,
                                              long pointNum,
                                              boolean returnTrueIfChunkEmpty)
        used for compaction to check whether the chunk is over threshold or not. Return true if there is no unsealed chunk.
      • checkIsUnsealedPageOverThreshold

        boolean checkIsUnsealedPageOverThreshold​(long size,
                                                 long pointNum,
                                                 boolean returnTrueIfPageEmpty)
        used for compaction to check whether the unsealed page is over threshold or not. Return true if there is no unsealed page.