public class ChunkWriterImpl extends Object implements IChunkWriter
| Constructor and Description |
|---|
ChunkWriterImpl(IMeasurementSchema schema) |
ChunkWriterImpl(IMeasurementSchema schema,
boolean isMerging) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearPageWriter()
set the current pageWriter to null, friendly for gc
|
long |
estimateMaxSeriesMemSize()
estimate memory usage of this series.
|
TSDataType |
getDataType() |
long |
getSerializedChunkSize()
return the serialized size of the chunk header + all pages (not including the un-sealed page).
|
boolean |
isMerging() |
void |
sealCurrentPage()
seal the current page which may has not enough data points in force.
|
void |
setIsMerging(boolean isMerging) |
void |
setLastPoint(boolean isLastPoint) |
void |
write(long[] timestamps,
Binary[] values,
int batchSize) |
void |
write(long[] timestamps,
boolean[] values,
int batchSize) |
void |
write(long[] timestamps,
double[] values,
int batchSize) |
void |
write(long[] timestamps,
float[] values,
int batchSize) |
void |
write(long[] timestamps,
int[] values,
int batchSize) |
void |
write(long[] timestamps,
long[] values,
int batchSize) |
void |
write(long time,
Binary value) |
void |
write(long time,
boolean value) |
void |
write(long time,
double value) |
void |
write(long time,
float value) |
void |
write(long time,
int value) |
void |
write(long time,
long value) |
void |
writePageHeaderAndDataIntoBuff(ByteBuffer data,
PageHeader header)
write the page header and data into the PageWriter's output stream.
|
void |
writeToFileWriter(TsFileIOWriter tsfileWriter)
flush data to TsFileIOWriter.
|
public ChunkWriterImpl(IMeasurementSchema schema)
schema - schema of this measurementpublic ChunkWriterImpl(IMeasurementSchema schema, boolean isMerging)
public void write(long time,
long value)
public void write(long time,
int value)
public void write(long time,
boolean value)
public void write(long time,
float value)
public void write(long time,
double value)
public void write(long time,
Binary value)
public void write(long[] timestamps,
int[] values,
int batchSize)
public void write(long[] timestamps,
long[] values,
int batchSize)
public void write(long[] timestamps,
boolean[] values,
int batchSize)
public void write(long[] timestamps,
float[] values,
int batchSize)
public void write(long[] timestamps,
double[] values,
int batchSize)
public void write(long[] timestamps,
Binary[] values,
int batchSize)
public void writeToFileWriter(TsFileIOWriter tsfileWriter) throws IOException
IChunkWriterwriteToFileWriter in interface IChunkWriterIOExceptionpublic long estimateMaxSeriesMemSize()
IChunkWriterestimateMaxSeriesMemSize in interface IChunkWriterpublic long getSerializedChunkSize()
IChunkWritergetSerializedChunkSize in interface IChunkWriterpublic void sealCurrentPage()
IChunkWritersealCurrentPage in interface IChunkWriterpublic void clearPageWriter()
IChunkWriterclearPageWriter in interface IChunkWriterpublic TSDataType getDataType()
public void writePageHeaderAndDataIntoBuff(ByteBuffer data, PageHeader header) throws PageException
PageExceptionpublic void setIsMerging(boolean isMerging)
public boolean isMerging()
public void setLastPoint(boolean isLastPoint)
Copyright © 2022 The Apache Software Foundation. All rights reserved.