Interface IRegionGroupAllocator
- All Known Implementing Classes:
GreedyCopySetRegionGroupAllocator,GreedyRegionGroupAllocator,PartiteGraphReplicationRegionGroupAllocator
public interface IRegionGroupAllocator
-
Method Summary
Modifier and TypeMethodDescriptiongenerateOptimalRegionReplicasDistribution(Map<Integer, TDataNodeConfiguration> availableDataNodeMap, Map<Integer, Double> freeDiskSpaceMap, List<TRegionReplicaSet> allocatedRegionGroups, List<TRegionReplicaSet> databaseAllocatedRegionGroups, int replicationFactor, TConsensusGroupId consensusGroupId) Generate an optimal RegionReplicas' distribution for a new RegionGroup.
-
Method Details
-
generateOptimalRegionReplicasDistribution
TRegionReplicaSet generateOptimalRegionReplicasDistribution(Map<Integer, TDataNodeConfiguration> availableDataNodeMap, Map<Integer, Double> freeDiskSpaceMap, List<TRegionReplicaSet> allocatedRegionGroups, List<TRegionReplicaSet> databaseAllocatedRegionGroups, int replicationFactor, TConsensusGroupId consensusGroupId) Generate an optimal RegionReplicas' distribution for a new RegionGroup.- Parameters:
availableDataNodeMap- DataNodes that can be used for allocationfreeDiskSpaceMap- The free disk space of the DataNodesallocatedRegionGroups- Allocated RegionGroupsdatabaseAllocatedRegionGroups- Allocated RegionGroups within the same Database with the resultreplicationFactor- Replication factor of TRegionReplicaSetconsensusGroupId- TConsensusGroupId of result TRegionReplicaSet- Returns:
- The optimal TRegionReplicaSet derived by the specified algorithm
-