public class AlignedChunkGroupWriterImpl extends Object implements IChunkGroupWriter
| Constructor and Description |
|---|
AlignedChunkGroupWriterImpl(String deviceId) |
| Modifier and Type | Method and Description |
|---|---|
long |
flushToFileWriter(TsFileIOWriter tsfileWriter)
flushing method for serializing to local file system or HDFS.
|
long |
getCurrentChunkGroupSize()
get the serialized size of current chunkGroup header + all chunks.
|
Long |
getLastTime() |
List<String> |
getMeasurements() |
void |
setLastTime(Long lastTime) |
void |
tryToAddEmptyPageAndData(ValueChunkWriter valueChunkWriter) |
void |
tryToAddSeriesWriter(List<MeasurementSchema> measurementSchemas)
given a measurement descriptor list, create corresponding writers and put into this
ChunkGroupWriter.
|
void |
tryToAddSeriesWriter(MeasurementSchema measurementSchema)
given a measurement descriptor, create a corresponding writer and put into this
ChunkGroupWriter.
|
long |
updateMaxGroupMemSize()
get the max memory occupied at this time.
|
int |
write(long time,
List<DataPoint> data)
receive a timestamp and a list of data points, write them to their series writers.
|
int |
write(Tablet tablet)
receive a tablet, write it to chunk writers
|
public AlignedChunkGroupWriterImpl(String deviceId)
public void tryToAddSeriesWriter(MeasurementSchema measurementSchema)
IChunkGroupWritertryToAddSeriesWriter in interface IChunkGroupWritermeasurementSchema - a measurement descriptor containing the message of the seriespublic void tryToAddSeriesWriter(List<MeasurementSchema> measurementSchemas)
IChunkGroupWritertryToAddSeriesWriter in interface IChunkGroupWriterpublic int write(long time,
List<DataPoint> data)
throws WriteProcessException,
IOException
IChunkGroupWriterwrite in interface IChunkGroupWritertime - - all data points have unify time stamp.data - - data point list to inputWriteProcessException - exception in write processIOException - exception in IOpublic int write(Tablet tablet) throws WriteProcessException, IOException
IChunkGroupWriterwrite in interface IChunkGroupWriterWriteProcessException - exception in write processIOException - exception in IOpublic long flushToFileWriter(TsFileIOWriter tsfileWriter) throws IOException
IChunkGroupWriterflushToFileWriter in interface IChunkGroupWritertsfileWriter - - TSFileIOWriterIOException - exception in IOpublic long updateMaxGroupMemSize()
IChunkGroupWriterlong calcAllocatedSize()updateMaxGroupMemSize in interface IChunkGroupWriterpublic long getCurrentChunkGroupSize()
IChunkGroupWritergetCurrentChunkGroupSize in interface IChunkGroupWriterpublic void tryToAddEmptyPageAndData(ValueChunkWriter valueChunkWriter)
public Long getLastTime()
public void setLastTime(Long lastTime)
Copyright © 2022 The Apache Software Foundation. All rights reserved.