Interface IChunkWriter
-
- All Known Implementing Classes:
AlignedChunkWriterImpl,ChunkWriterImpl
public interface IChunkWriterIChunkWriter provides a list of writing methods for different value types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckIsChunkSizeOverThreshold(long size, long pointNum, boolean returnTrueIfChunkEmpty)used for compaction to check whether the chunk is over threshold or not.booleancheckIsUnsealedPageOverThreshold(long size, long pointNum, boolean returnTrueIfPageEmpty)used for compaction to check whether the unsealed page is over threshold or not.voidclearPageWriter()set the current pageWriter to null, friendly for gclongestimateMaxSeriesMemSize()estimate memory usage of this series.longgetSerializedChunkSize()return the serialized size of the chunk header + all pages (not including the un-sealed page).voidsealCurrentPage()seal the current page which may has not enough data points in force.voidwriteToFileWriter(TsFileIOWriter tsfileWriter)flush data to TsFileIOWriter.
-
-
-
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.
-
-