Class DeviceGroupSchemaTree

  • All Implemented Interfaces:
    ISchemaTree

    public class DeviceGroupSchemaTree
    extends java.lang.Object
    implements ISchemaTree
    This class is specifically for standalone schema validation during data insertion. Since the schema fetch is mainly based on device path, the schema is directly grouped by device rater than organized as a trie.
    • Constructor Detail

      • DeviceGroupSchemaTree

        public DeviceGroupSchemaTree()
    • Method Detail

      • addDeviceInfo

        public void addDeviceInfo​(DeviceSchemaInfo deviceSchemaInfo)
      • 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)
        Description copied from interface: ISchemaTree
        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)
        Description copied from interface: ISchemaTree
        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.
      • getBelongedStorageGroup

        public java.lang.String getBelongedStorageGroup​(java.lang.String pathName)
        Description copied from interface: ISchemaTree
        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