Class ClusterSchemaTree

  • All Implemented Interfaces:
    ISchemaTree

    public class ClusterSchemaTree
    extends java.lang.Object
    implements ISchemaTree
    • Constructor Detail

      • ClusterSchemaTree

        public ClusterSchemaTree()
      • ClusterSchemaTree

        public ClusterSchemaTree​(SchemaNode root)
    • Method Detail

      • searchMeasurementPaths

        public org.apache.iotdb.tsfile.utils.Pair<java.util.List<MeasurementPath>,​java.lang.Integer> searchMeasurementPaths​(org.apache.iotdb.commons.path.PartialPath pathPattern,
                                                                                                                                  int slimit,
                                                                                                                                  int soffset,
                                                                                                                                  boolean isPrefixMatch)
        Return all measurement paths for given path pattern and filter the result by slimit and offset.
        Specified by:
        searchMeasurementPaths in interface ISchemaTree
        Parameters:
        pathPattern - can be a pattern or a full path of timeseries.
        isPrefixMatch - if true, the path pattern is used to match prefix path
        Returns:
        Left: all measurement paths; Right: remaining series offset
      • searchMeasurementPaths

        public org.apache.iotdb.tsfile.utils.Pair<java.util.List<MeasurementPath>,​java.lang.Integer> searchMeasurementPaths​(org.apache.iotdb.commons.path.PartialPath pathPattern)
        Specified by:
        searchMeasurementPaths in interface ISchemaTree
      • getMatchedDevices

        public java.util.List<DeviceSchemaInfo> getMatchedDevices​(org.apache.iotdb.commons.path.PartialPath pathPattern,
                                                                  boolean isPrefixMatch)
        Get all device matching the path pattern.
        Specified by:
        getMatchedDevices in interface ISchemaTree
        Parameters:
        pathPattern - the pattern of the target devices.
        Returns:
        A HashSet instance which stores info of the devices matching the given path pattern.
      • appendMeasurementPaths

        public void appendMeasurementPaths​(java.util.List<MeasurementPath> measurementPathList)
      • appendSingleMeasurement

        public void appendSingleMeasurement​(org.apache.iotdb.commons.path.PartialPath path,
                                            org.apache.iotdb.tsfile.write.schema.MeasurementSchema schema,
                                            java.lang.String alias,
                                            boolean isAligned)
      • serialize

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

        public static ClusterSchemaTree deserialize​(java.io.InputStream inputStream)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getBelongedStorageGroup

        public java.lang.String getBelongedStorageGroup​(java.lang.String pathName)
        Get storage group name by path

        e.g., root.sg1 is a storage group and path = root.sg1.d1, return root.sg1

        Specified by:
        getBelongedStorageGroup in interface ISchemaTree
        Parameters:
        pathName - only full path, cannot be path pattern
        Returns:
        storage group in the given path
      • getBelongedStorageGroup

        public java.lang.String getBelongedStorageGroup​(org.apache.iotdb.commons.path.PartialPath path)
        Specified by:
        getBelongedStorageGroup in interface ISchemaTree
      • getStorageGroups

        public java.util.List<java.lang.String> getStorageGroups()
        Specified by:
        getStorageGroups in interface ISchemaTree
      • setStorageGroups

        public void setStorageGroups​(java.util.List<java.lang.String> storageGroups)