类 StorageGroupPartitionTable


  • public class StorageGroupPartitionTable
    extends java.lang.Object
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      boolean containRegion​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId regionId)
      if the region contained?
      void createDataPartition​(org.apache.iotdb.commons.partition.DataPartitionTable assignedDataPartition)
      Create DataPartition within the specific StorageGroup
      void createRegionGroups​(java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> replicaSets)
      Cache allocation result of new RegionGroups
      void createSchemaPartition​(org.apache.iotdb.commons.partition.SchemaPartitionTable assignedSchemaPartition)
      Create SchemaPartition within the specific StorageGroup
      void deleteRegionGroups​(java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> replicaSets)
      Delete RegionGroups' cache
      void deserialize​(java.io.InputStream inputStream, org.apache.thrift.protocol.TProtocol protocol)  
      boolean equals​(java.lang.Object o)  
      java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> filterUnassignedDataPartitionSlots​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> partitionSlots)
      Only Leader use this interface.
      java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> filterUnassignedSchemaPartitionSlots​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots)
      Only Leader use this interface.
      java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getAllReplicaSets()  
      java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getAllReplicaSets​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      Get all RegionGroups currently owned by this StorageGroup
      int getAssignedSeriesPartitionSlotsCount()  
      boolean getDataPartition​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> partitionSlots, org.apache.iotdb.commons.partition.DataPartitionTable dataPartition)
      Thread-safely get DataPartition within the specific StorageGroup
      int getDataPartitionMapSize()  
      org.apache.iotdb.common.rpc.thrift.TConsensusGroupId getPrecededDataPartition​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesPartitionSlot, org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot timePartitionSlot, long timePartitionInterval)
      Checks whether the specified DataPartition has a predecessor and returns if it does
      int getRegionGroupCount​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      Get the number of RegionGroups currently owned by this StorageGroup
      java.util.Set<RegionGroup> getRegionGroups​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      Get all RegionGroups currently owned by this StorageGroup
      java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.Long,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId>> getRegionGroupSlotsCounter​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      Only leader use this interface.
      java.util.List<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getRegionId​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type, org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId, org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot timeSlotId)  
      java.util.List<org.apache.iotdb.confignode.rpc.thrift.TRegionInfo> getRegionInfoList​(GetRegionInfoListPlan regionsInfoPlan)  
      boolean getSchemaPartition​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots, org.apache.iotdb.commons.partition.SchemaPartitionTable schemaPartition)
      Thread-safely get SchemaPartition within the specific StorageGroup
      int getSchemaPartitionMapSize()  
      java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> getSeriesSlotList​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)  
      java.lang.String getStorageGroupName()  
      java.util.Set<org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> getStorageGroupRelatedDataNodes​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      Get the DataNodes who contain the specific StorageGroup's Schema or Data
      java.util.List<org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot> getTimeSlotList​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId, long startTime, long endTime)  
      int hashCode()  
      boolean isPredeleted()  
      void serialize​(java.io.OutputStream outputStream, org.apache.thrift.protocol.TProtocol protocol)  
      void setPredeleted​(boolean predeleted)  
      void updateRegionLocation​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId regionId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation oldNode, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation newNode)
      update region location
      • 从类继承的方法 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • StorageGroupPartitionTable

        public StorageGroupPartitionTable​(java.lang.String storageGroupName)
    • 方法详细资料

      • isPredeleted

        public boolean isPredeleted()
      • setPredeleted

        public void setPredeleted​(boolean predeleted)
      • createRegionGroups

        public void createRegionGroups​(java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> replicaSets)
        Cache allocation result of new RegionGroups
        参数:
        replicaSets - List
      • deleteRegionGroups

        public void deleteRegionGroups​(java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> replicaSets)
        Delete RegionGroups' cache
        参数:
        replicaSets - List
      • getAllReplicaSets

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getAllReplicaSets()
        返回:
        Deep copy of all Regions' RegionReplicaSet within one StorageGroup
      • getAllReplicaSets

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getAllReplicaSets​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
        Get all RegionGroups currently owned by this StorageGroup
        参数:
        type - The specified TConsensusGroupType
        返回:
        Deep copy of all Regions' RegionReplicaSet with the specified TConsensusGroupType
      • getRegionGroups

        public java.util.Set<RegionGroup> getRegionGroups​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
        Get all RegionGroups currently owned by this StorageGroup
        参数:
        type - SchemaRegion or DataRegion
        返回:
        The regions currently owned by this StorageGroup
      • getRegionGroupCount

        public int getRegionGroupCount​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
        Get the number of RegionGroups currently owned by this StorageGroup
        参数:
        type - SchemaRegion or DataRegion
        返回:
        The number of Regions currently owned by this StorageGroup
      • getAssignedSeriesPartitionSlotsCount

        public int getAssignedSeriesPartitionSlotsCount()
      • getSchemaPartition

        public boolean getSchemaPartition​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots,
                                          org.apache.iotdb.commons.partition.SchemaPartitionTable schemaPartition)
        Thread-safely get SchemaPartition within the specific StorageGroup
        参数:
        partitionSlots - SeriesPartitionSlots
        schemaPartition - Where the results are stored
        返回:
        True if all the SeriesPartitionSlots are matched, false otherwise
      • getDataPartition

        public boolean getDataPartition​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> partitionSlots,
                                        org.apache.iotdb.commons.partition.DataPartitionTable dataPartition)
        Thread-safely get DataPartition within the specific StorageGroup
        参数:
        partitionSlots - SeriesPartitionSlots and TimePartitionSlots
        dataPartition - Where the results are stored
        返回:
        True if all the PartitionSlots are matched, false otherwise
      • getPrecededDataPartition

        public org.apache.iotdb.common.rpc.thrift.TConsensusGroupId getPrecededDataPartition​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesPartitionSlot,
                                                                                             org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot timePartitionSlot,
                                                                                             long timePartitionInterval)
        Checks whether the specified DataPartition has a predecessor and returns if it does
        参数:
        seriesPartitionSlot - Corresponding SeriesPartitionSlot
        timePartitionSlot - Corresponding TimePartitionSlot
        timePartitionInterval - Time partition interval
        返回:
        The specific DataPartition's predecessor if exists, null otherwise
      • createSchemaPartition

        public void createSchemaPartition​(org.apache.iotdb.commons.partition.SchemaPartitionTable assignedSchemaPartition)
        Create SchemaPartition within the specific StorageGroup
        参数:
        assignedSchemaPartition - Assigned result
      • createDataPartition

        public void createDataPartition​(org.apache.iotdb.commons.partition.DataPartitionTable assignedDataPartition)
        Create DataPartition within the specific StorageGroup
        参数:
        assignedDataPartition - Assigned result
      • filterUnassignedSchemaPartitionSlots

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> filterUnassignedSchemaPartitionSlots​(java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> partitionSlots)
        Only Leader use this interface. Filter unassigned SchemaPartitionSlots within the specific StorageGroup
        参数:
        partitionSlots - List
        返回:
        Unassigned PartitionSlots
      • getStorageGroupRelatedDataNodes

        public java.util.Set<org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> getStorageGroupRelatedDataNodes​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
        Get the DataNodes who contain the specific StorageGroup's Schema or Data
        参数:
        type - SchemaRegion or DataRegion
        返回:
        Set, the related DataNodes
      • filterUnassignedDataPartitionSlots

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> filterUnassignedDataPartitionSlots​(java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList> partitionSlots)
        Only Leader use this interface. Filter unassigned DataPartitionSlots within the specific StorageGroup
        参数:
        partitionSlots - List
        返回:
        Unassigned PartitionSlots
      • getRegionGroupSlotsCounter

        public java.util.List<org.apache.iotdb.tsfile.utils.Pair<java.lang.Long,​org.apache.iotdb.common.rpc.thrift.TConsensusGroupId>> getRegionGroupSlotsCounter​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
        Only leader use this interface.
        参数:
        type - SchemaRegion or DataRegion
        返回:
        RegionGroups' slot count and index
      • getRegionInfoList

        public java.util.List<org.apache.iotdb.confignode.rpc.thrift.TRegionInfo> getRegionInfoList​(GetRegionInfoListPlan regionsInfoPlan)
      • serialize

        public void serialize​(java.io.OutputStream outputStream,
                              org.apache.thrift.protocol.TProtocol protocol)
                       throws java.io.IOException,
                              org.apache.thrift.TException
        抛出:
        java.io.IOException
        org.apache.thrift.TException
      • deserialize

        public void deserialize​(java.io.InputStream inputStream,
                                org.apache.thrift.protocol.TProtocol protocol)
                         throws java.io.IOException,
                                org.apache.thrift.TException
        抛出:
        java.io.IOException
        org.apache.thrift.TException
      • getRegionId

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId> getRegionId​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type,
                                                                                                org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId,
                                                                                                org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot timeSlotId)
      • getTimeSlotList

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot> getTimeSlotList​(org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot seriesSlotId,
                                                                                                     long startTime,
                                                                                                     long endTime)
      • getSeriesSlotList

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot> getSeriesSlotList​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType type)
      • updateRegionLocation

        public void updateRegionLocation​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId regionId,
                                         org.apache.iotdb.common.rpc.thrift.TDataNodeLocation oldNode,
                                         org.apache.iotdb.common.rpc.thrift.TDataNodeLocation newNode)
        update region location
        参数:
        regionId - regionId
        oldNode - old location, will remove it
        newNode - new location, will add it
      • containRegion

        public boolean containRegion​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId regionId)
        if the region contained?
        参数:
        regionId - TConsensusGroupId
        返回:
        true if contain
      • getStorageGroupName

        public java.lang.String getStorageGroupName()
      • getDataPartitionMapSize

        public int getDataPartitionMapSize()
      • getSchemaPartitionMapSize

        public int getSchemaPartitionMapSize()
      • equals

        public boolean equals​(java.lang.Object o)
        覆盖:
        equals 在类中 java.lang.Object
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 java.lang.Object