Interface IRegionGroupAllocator

All Known Implementing Classes:
GreedyCopySetRegionGroupAllocator, GreedyRegionGroupAllocator, PartiteGraphReplicationRegionGroupAllocator

public interface IRegionGroupAllocator
  • 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 allocation
      freeDiskSpaceMap - The free disk space of the DataNodes
      allocatedRegionGroups - Allocated RegionGroups
      databaseAllocatedRegionGroups - Allocated RegionGroups within the same Database with the result
      replicationFactor - Replication factor of TRegionReplicaSet
      consensusGroupId - TConsensusGroupId of result TRegionReplicaSet
      Returns:
      The optimal TRegionReplicaSet derived by the specified algorithm