Class 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.
    • Field Detail

      • time

        public long time
        timestamp of this TSRecord.
      • deviceId

        public String deviceId
        deviceId of this TSRecord.
      • dataPointList

        public List<DataPoint> dataPointList
        all value of this TSRecord.
    • Constructor Detail

      • TSRecord

        public TSRecord​(long timestamp,
                        String deviceId)
        constructor of TSRecord.
        Parameters:
        timestamp - timestamp of this TSRecord
        deviceId - 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 }]}
        Overrides:
        toString in class Object
        Returns:
        the String format of this TSRecord