类 MinCostFlowLeaderBalancer
- java.lang.Object
-
- org.apache.iotdb.confignode.manager.load.balancer.router.leader.MinCostFlowLeaderBalancer
-
- 所有已实现的接口:
ILeaderBalancer
public class MinCostFlowLeaderBalancer extends java.lang.Object implements ILeaderBalancer
Leader distribution balancer that uses minimum cost flow algorithm
-
-
字段概要
-
从接口继承的字段 org.apache.iotdb.confignode.manager.load.balancer.router.leader.ILeaderBalancer
GREEDY_POLICY, MIN_COST_FLOW_POLICY
-
-
构造器概要
构造器 构造器 说明 MinCostFlowLeaderBalancer()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,java.lang.Integer>generateOptimalLeaderDistribution(java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> regionReplicaSetMap, java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,java.lang.Integer> regionLeaderMap, java.util.Set<java.lang.Integer> disabledDataNodeSet)Generate an optimal leader distribution.intgetMaximumFlow()intgetMinimumCost()
-
-
-
方法详细资料
-
generateOptimalLeaderDistribution
public java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,java.lang.Integer> generateOptimalLeaderDistribution(java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> regionReplicaSetMap, java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,java.lang.Integer> regionLeaderMap, java.util.Set<java.lang.Integer> disabledDataNodeSet)从接口复制的说明:ILeaderBalancerGenerate an optimal leader distribution.- 指定者:
generateOptimalLeaderDistribution在接口中ILeaderBalancer- 参数:
regionReplicaSetMap- All RegionGroups the cluster currently haveregionLeaderMap- The current leader of each RegionGroupdisabledDataNodeSet- The DataNodes that currently unable to work(can't place RegionGroup-leader)- 返回:
- Map
, The optimal leader distribution
-
getMaximumFlow
public int getMaximumFlow()
-
getMinimumCost
public int getMinimumCost()
-
-