mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
RegionService下的updateRegion的重载方法含义错误;应该是根据regionId更新region,参数应该是regionId,不是clusterId
This commit is contained in:
@@ -54,12 +54,12 @@ public interface RegionService {
|
||||
Map<Integer, RegionDO> convert2BrokerIdRegionMap(List<RegionDO> regionDOList);
|
||||
|
||||
/**
|
||||
* 更新逻辑集群容量
|
||||
* @param clusterId 集群id
|
||||
* 根据RegionId更新Region
|
||||
* @param regionId region的id
|
||||
* @param newBrokerList 新的broker列表
|
||||
* @return ResultStatus
|
||||
*/
|
||||
ResultStatus updateRegion(Long clusterId, String newBrokerList);
|
||||
ResultStatus updateRegion(Long regionId, String newBrokerList);
|
||||
|
||||
/**
|
||||
* 获取空闲的region的broker列表
|
||||
|
||||
@@ -134,11 +134,11 @@ public class RegionServiceImpl implements RegionService {
|
||||
|
||||
|
||||
@Override
|
||||
public ResultStatus updateRegion(Long clusterId, String newBrokerList) {
|
||||
if (ValidateUtils.isNull(clusterId) || ValidateUtils.isExistBlank(newBrokerList)) {
|
||||
public ResultStatus updateRegion(Long regionId, String newBrokerList) {
|
||||
if (ValidateUtils.isNull(regionId) || ValidateUtils.isExistBlank(newBrokerList)) {
|
||||
return ResultStatus.PARAM_ILLEGAL;
|
||||
}
|
||||
RegionDO regionDO = getById(clusterId);
|
||||
RegionDO regionDO = getById(regionId);
|
||||
if (ValidateUtils.isNull(regionDO)) {
|
||||
return ResultStatus.CLUSTER_NOT_EXIST;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user