Class ValueChunkWriter
- java.lang.Object
-
- org.apache.iotdb.tsfile.write.chunk.ValueChunkWriter
-
public class ValueChunkWriter extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ValueChunkWriter(java.lang.String measurementId, CompressionType compressionType, TSDataType dataType, TSEncoding encodingType, Encoder valueEncoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckIsUnsealedPageOverThreshold(long size)booleancheckPageSizeAndMayOpenANewPage()voidclearPageWriter()longestimateMaxSeriesMemSize()CompressionTypegetCompressionType()longgetCurrentChunkSize()TSDataTypegetDataType()TSEncodinggetEncodingType()java.lang.StringgetMeasurementId()intgetNumOfPages()PublicBAOSgetPageBuffer()only used for testValuePageWritergetPageWriter()voidsealCurrentPage()voidwrite(long[] timestamps, boolean[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long[] timestamps, double[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long[] timestamps, float[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long[] timestamps, int[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long[] timestamps, long[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long[] timestamps, Binary[] values, boolean[] isNull, int batchSize, int pos)voidwrite(long time, boolean value, boolean isNull)voidwrite(long time, double value, boolean isNull)voidwrite(long time, float value, boolean isNull)voidwrite(long time, int value, boolean isNull)voidwrite(long time, long value, boolean isNull)voidwrite(long time, Binary value, boolean isNull)voidwriteAllPagesOfChunkToTsFile(TsFileIOWriter writer)write the page to specified IOWriter.voidwriteEmptyPageToPageBuffer()voidwritePageHeaderAndDataIntoBuff(java.nio.ByteBuffer data, PageHeader header)voidwritePageToPageBuffer()voidwriteToFileWriter(TsFileIOWriter tsfileWriter)
-
-
-
Constructor Detail
-
ValueChunkWriter
public ValueChunkWriter(java.lang.String measurementId, CompressionType compressionType, TSDataType dataType, TSEncoding encodingType, Encoder valueEncoder)
-
-
Method Detail
-
write
public void write(long time, long value, boolean isNull)
-
write
public void write(long time, int value, boolean isNull)
-
write
public void write(long time, boolean value, boolean isNull)
-
write
public void write(long time, float value, boolean isNull)
-
write
public void write(long time, double value, boolean isNull)
-
write
public void write(long time, Binary value, boolean isNull)
-
write
public void write(long[] timestamps, int[] values, boolean[] isNull, int batchSize, int pos)
-
write
public void write(long[] timestamps, long[] values, boolean[] isNull, int batchSize, int pos)
-
write
public void write(long[] timestamps, boolean[] values, boolean[] isNull, int batchSize, int pos)
-
write
public void write(long[] timestamps, float[] values, boolean[] isNull, int batchSize, int pos)
-
write
public void write(long[] timestamps, double[] values, boolean[] isNull, int batchSize, int pos)
-
write
public void write(long[] timestamps, Binary[] values, boolean[] isNull, int batchSize, int pos)
-
writeEmptyPageToPageBuffer
public void writeEmptyPageToPageBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
writePageToPageBuffer
public void writePageToPageBuffer()
-
writePageHeaderAndDataIntoBuff
public void writePageHeaderAndDataIntoBuff(java.nio.ByteBuffer data, PageHeader header) throws PageException- Throws:
PageException
-
writeToFileWriter
public void writeToFileWriter(TsFileIOWriter tsfileWriter) throws java.io.IOException
- Throws:
java.io.IOException
-
estimateMaxSeriesMemSize
public long estimateMaxSeriesMemSize()
-
getCurrentChunkSize
public long getCurrentChunkSize()
-
checkPageSizeAndMayOpenANewPage
public boolean checkPageSizeAndMayOpenANewPage()
-
sealCurrentPage
public void sealCurrentPage()
-
clearPageWriter
public void clearPageWriter()
-
getNumOfPages
public int getNumOfPages()
-
getDataType
public TSDataType getDataType()
-
writeAllPagesOfChunkToTsFile
public void writeAllPagesOfChunkToTsFile(TsFileIOWriter writer) throws java.io.IOException
write the page to specified IOWriter.- Parameters:
writer- the specified IOWriter- Throws:
java.io.IOException- exception in IO
-
getMeasurementId
public java.lang.String getMeasurementId()
-
getEncodingType
public TSEncoding getEncodingType()
-
getCompressionType
public CompressionType getCompressionType()
-
getPageBuffer
public PublicBAOS getPageBuffer()
only used for test
-
checkIsUnsealedPageOverThreshold
public boolean checkIsUnsealedPageOverThreshold(long size)
-
getPageWriter
public ValuePageWriter getPageWriter()
-
-