public class Tablet extends Object
for example: device root.sg1.d1
time, m1, m2, m3 1, 1, 2, 3 2, 1, 2, 3 3, 1, 2, 3
Notice: The tablet should not have empty cell, please use BitMap to denote null value
| Modifier and Type | Field and Description |
|---|---|
BitMap[] |
bitMaps
each bitmap represents the existence of each value in the current column.
|
String |
deviceId
deviceId of this tablet
|
int |
rowSize
the number of rows to include in this tablet
|
long[] |
timestamps
timestamps in this tablet
|
Object[] |
values
each object is a primitive type array, which represents values of one measurement
|
| Constructor and Description |
|---|
Tablet(String deviceId,
List<MeasurementSchema> schemas)
Return a tablet with default specified row number.
|
Tablet(String deviceId,
List<MeasurementSchema> schemas,
int maxRowNumber)
Return a tablet with the specified number of rows (maxBatchSize).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTimestamp(int rowIndex,
long timestamp) |
void |
addValue(String measurementId,
int rowIndex,
Object value) |
int |
getMaxRowNumber()
Return the maximum number of rows for this tablet
|
List<MeasurementSchema> |
getSchemas() |
int |
getTimeBytesSize() |
int |
getTotalValueOccupation() |
void |
initBitMaps() |
void |
reset()
Reset Tablet to the default state - set the rowSize to 0 and reset bitMaps
|
void |
setDeviceId(String deviceId) |
void |
setSchemas(List<MeasurementSchema> schemas) |
public String deviceId
public long[] timestamps
public Object[] values
public BitMap[] bitMaps
public int rowSize
public Tablet(String deviceId, List<MeasurementSchema> schemas)
deviceId - the name of the device specified to be written inschemas - the list of measurement schemas for creating the tablet, only measurementId and
type take effectspublic Tablet(String deviceId, List<MeasurementSchema> schemas, int maxRowNumber)
deviceId - the name of the device specified to be written inschemas - the list of measurement schemas for creating the row batch, only measurementId
and type take effectsmaxRowNumber - the maximum number of rows for this tabletpublic void setDeviceId(String deviceId)
public void setSchemas(List<MeasurementSchema> schemas)
public void initBitMaps()
public void addTimestamp(int rowIndex,
long timestamp)
public List<MeasurementSchema> getSchemas()
public int getMaxRowNumber()
public void reset()
public int getTimeBytesSize()
public int getTotalValueOccupation()
Copyright © 2022 The Apache Software Foundation. All rights reserved.