类 LoadManager


  • public class LoadManager
    extends java.lang.Object
    The LoadManager at ConfigNodeGroup-Leader is active. It proactively implements the cluster dynamic load balancing policy and passively accepts the PartitionTable expansion request.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      java.util.Map<java.lang.String,​org.apache.iotdb.commons.partition.DataPartitionTable> allocateDataPartition​(java.util.Map<java.lang.String,​java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList>> unassignedDataPartitionSlotsMap)
      Allocate DataPartitions
      CreateRegionGroupsPlan allocateRegionGroups​(java.util.Map<java.lang.String,​java.lang.Integer> allotmentMap, org.apache.iotdb.common.rpc.thrift.TConsensusGroupType consensusGroupType)
      Generate an optimal CreateRegionGroupsPlan
      java.util.Map<java.lang.String,​org.apache.iotdb.commons.partition.SchemaPartitionTable> allocateSchemaPartition​(java.util.Map<java.lang.String,​java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
      Allocate SchemaPartitions
      void broadcastLatestRegionRouteMap()  
      java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​java.lang.Integer> getLatestRegionLeaderMap()  
      java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getLatestRegionRouteMap()
      Generate an optimal real-time read/write requests routing policy.
      RouteBalancer getRouteBalancer()  
      void initHeartbeatCache()
      Initialize all kinds of the HeartbeatCache when the ConfigNode-Leader is switched
      void startLoadStatisticsService()
      Start the load statistics service
      void stopLoadStatisticsService()
      Stop the load statistics service
      • 从类继承的方法 java.lang.Object

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

      • LoadManager

        public LoadManager​(IManager configManager)
    • 方法详细资料

      • allocateSchemaPartition

        public java.util.Map<java.lang.String,​org.apache.iotdb.commons.partition.SchemaPartitionTable> allocateSchemaPartition​(java.util.Map<java.lang.String,​java.util.List<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
                                                                                                                              throws NoAvailableRegionGroupException
        Allocate SchemaPartitions
        参数:
        unassignedSchemaPartitionSlotsMap - SchemaPartitionSlots that should be assigned
        返回:
        Map, the allocating result
        抛出:
        NoAvailableRegionGroupException
      • allocateDataPartition

        public java.util.Map<java.lang.String,​org.apache.iotdb.commons.partition.DataPartitionTable> allocateDataPartition​(java.util.Map<java.lang.String,​java.util.Map<org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot,​org.apache.iotdb.confignode.rpc.thrift.TTimeSlotList>> unassignedDataPartitionSlotsMap)
                                                                                                                          throws NoAvailableRegionGroupException
        Allocate DataPartitions
        参数:
        unassignedDataPartitionSlotsMap - DataPartitionSlots that should be assigned
        返回:
        Map, the allocating result
        抛出:
        NoAvailableRegionGroupException
      • getLatestRegionLeaderMap

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​java.lang.Integer> getLatestRegionLeaderMap()
      • getLatestRegionRouteMap

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getLatestRegionRouteMap()
        Generate an optimal real-time read/write requests routing policy.
        返回:
        Map, The routing policy of read/write requests for each Region is based on the order in the TRegionReplicaSet. The replica with higher sorting result have higher priority.
      • startLoadStatisticsService

        public void startLoadStatisticsService()
        Start the load statistics service
      • stopLoadStatisticsService

        public void stopLoadStatisticsService()
        Stop the load statistics service
      • broadcastLatestRegionRouteMap

        public void broadcastLatestRegionRouteMap()
      • initHeartbeatCache

        public void initHeartbeatCache()
        Initialize all kinds of the HeartbeatCache when the ConfigNode-Leader is switched