Class TSRecord
- java.lang.Object
-
- org.apache.iotdb.tsfile.write.record.TSRecord
-
public class TSRecord extends java.lang.ObjectTSRecord is a kind of format that TsFile receives.TSRecord contains timestamp, deviceId and a list of data points.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<DataPoint>dataPointListall value of this TSRecord.java.lang.StringdeviceIddeviceId of this TSRecord.longtimetimestamp of this TSRecord.
-
Constructor Summary
Constructors Constructor Description TSRecord(long timestamp, java.lang.String deviceId)constructor of TSRecord.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TSRecordaddTuple(DataPoint tuple)add one data point to this TSRecord.voidsetTime(long timestamp)java.lang.StringtoString()output this TSRecord in String format.For example: {device id: d1 time: 123456 ,data:[ {measurement id: s1 type:INT32 value: 1 } {measurement id: s2 type: FLOAT value: 11.11 } {measurement id: s3 type: BOOLEAN value: true }]}
-
-
-
Field Detail
-
time
public long time
timestamp of this TSRecord.
-
deviceId
public java.lang.String deviceId
deviceId of this TSRecord.
-
dataPointList
public java.util.List<DataPoint> dataPointList
all value of this TSRecord.
-
-
Method Detail
-
setTime
public void setTime(long timestamp)
-
addTuple
public TSRecord addTuple(DataPoint tuple)
add one data point to this TSRecord.- Parameters:
tuple- data point to be added
-
toString
public java.lang.String toString()
output this TSRecord in String format.For example: {device id: d1 time: 123456 ,data:[ {measurement id: s1 type:INT32 value: 1 } {measurement id: s2 type: FLOAT value: 11.11 } {measurement id: s3 type: BOOLEAN value: true }]}- Overrides:
toStringin classjava.lang.Object- Returns:
- the String format of this TSRecord
-
-