Class TSRecord
- java.lang.Object
-
- org.apache.iotdb.tsfile.write.record.TSRecord
-
public class TSRecord extends Object
TSRecord is a kind of format that TsFile receives.TSRecord contains timestamp, deviceId and a list of data points.
-
-
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)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 }]}
-
-
-
Constructor Detail
-
TSRecord
public TSRecord(long timestamp, String deviceId)constructor of TSRecord.- Parameters:
timestamp- timestamp of this TSRecorddeviceId- deviceId 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 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 }]}
-
-