Class Path

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Path>

    public class Path
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<Path>
    This class represent a time series in TsFile, which is usually defined by a device and a measurement.

    If you want to use one String such as "device1.measurement1" to init Path in TsFile API, please use the new Path(string, true) to split it to device and measurement.

    See Also:
    Serialized Form
    • Field Detail

      • device

        protected java.lang.String device
      • fullPath

        protected java.lang.String fullPath
    • Constructor Detail

      • Path

        public Path()
      • Path

        public Path​(java.lang.String pathSc)
        this constructor doesn't split the path, only useful for table header.
        Parameters:
        pathSc - the path that wouldn't be split.
      • Path

        public Path​(java.lang.String pathSc,
                    boolean needSplit)
        Parameters:
        pathSc - path
        needSplit - whether need to be split to device and measurement, doesn't support escape character yet.
      • Path

        public Path​(java.lang.String device,
                    java.lang.String measurement,
                    boolean needCheck)
        construct a Path directly using device and measurement, no need to reformat the path
        Parameters:
        device - root.deviceType.d1
        measurement - s1 , does not contain TsFileConstant.PATH_SEPARATOR
        needCheck - need to validate the correctness of the path
    • Method Detail

      • getFullPath

        public java.lang.String getFullPath()
      • getDevice

        public java.lang.String getDevice()
      • getMeasurement

        public java.lang.String getMeasurement()
      • getFullPathWithAlias

        public java.lang.String getFullPathWithAlias()
      • setMeasurement

        public void setMeasurement​(java.lang.String measurement)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • equals

        public boolean equals​(java.lang.String obj)
      • compareTo

        public int compareTo​(Path path)
        Specified by:
        compareTo in interface java.lang.Comparable<Path>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public Path clone()
        Overrides:
        clone in class java.lang.Object
      • getColumnNum

        public int getColumnNum()
        return the column contained by this path
      • serialize

        public void serialize​(java.nio.ByteBuffer byteBuffer)
      • serialize

        public void serialize​(java.io.OutputStream stream)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • serialize

        public void serialize​(PublicBAOS stream)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • serializeWithoutType

        protected void serializeWithoutType​(java.nio.ByteBuffer byteBuffer)
      • serializeWithoutType

        protected void serializeWithoutType​(java.io.OutputStream stream)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • serializeWithoutType

        protected void serializeWithoutType​(PublicBAOS stream)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public static Path deserialize​(java.nio.ByteBuffer byteBuffer)