public CreateRegionGroupsPlan allocateRegionGroups(
      final Map<String, Integer> allotmentMap, final TConsensusGroupType consensusGroupType)
      throws NotEnoughDataNodeException, DatabaseNotExistsException {
    return regionBalancer.genRegionGroupsAllocationPlan(allotmentMap, consensusGroupType);
  }
Generate an optimal CreateRegionGroupsPlan.

@param allotmentMap Map<DatabaseName, Region allotment>
@param consensusGroupType TConsensusGroupType of RegionGroup to be allocated
@return CreateRegionGroupsPlan
@throws NotEnoughDataNodeException If there are not enough DataNodes
@throws DatabaseNotExistsException If some specific StorageGroups don't exist
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java