Class TSRecord


  • public class TSRecord
    extends java.lang.Object
    TSRecord 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> dataPointList
      all value of this TSRecord.
      java.lang.String deviceId
      deviceId of this TSRecord.
      long time
      timestamp 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
      TSRecord addTuple​(DataPoint tuple)
      add one data point to this TSRecord.
      void setTime​(long timestamp)  
      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 }]}
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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.
    • Constructor Detail

      • TSRecord

        public TSRecord​(long timestamp,
                        java.lang.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 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:
        toString in class java.lang.Object
        Returns:
        the String format of this TSRecord