mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
Jmx连接的主机IP支持可选择
This commit is contained in:
@@ -130,6 +130,9 @@ public class BrokerServiceImpl extends BaseVersionControlService implements Brok
|
||||
|
||||
// 如果当前Broker还存活,则更新DB信息
|
||||
BrokerPO newBrokerPO = ConvertUtil.obj2Obj(presentAliveBroker, BrokerPO.class);
|
||||
if (presentAliveBroker.getEndpointMap() != null) {
|
||||
newBrokerPO.setEndpointMap(ConvertUtil.obj2Json(presentAliveBroker.getEndpointMap()));
|
||||
}
|
||||
newBrokerPO.setId(inDBBrokerPO.getId());
|
||||
newBrokerPO.setStatus(Constant.ALIVE);
|
||||
newBrokerPO.setCreateTime(inDBBrokerPO.getCreateTime());
|
||||
@@ -203,7 +206,7 @@ public class BrokerServiceImpl extends BaseVersionControlService implements Brok
|
||||
lambdaQueryWrapper.eq(BrokerPO::getClusterPhyId, clusterPhyId);
|
||||
lambdaQueryWrapper.eq(BrokerPO::getBrokerId, brokerId);
|
||||
|
||||
return ConvertUtil.obj2Obj(brokerDAO.selectOne(lambdaQueryWrapper), Broker.class);
|
||||
return Broker.buildFrom(brokerDAO.selectOne(lambdaQueryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -272,9 +275,8 @@ public class BrokerServiceImpl extends BaseVersionControlService implements Brok
|
||||
/**************************************************** private method ****************************************************/
|
||||
|
||||
private List<Broker> listAllBrokersAndUpdateCache(Long clusterPhyId) {
|
||||
List<Broker> allBrokerList = ConvertUtil.list2List(this.getAllBrokerPOsFromDB(clusterPhyId), Broker.class);
|
||||
List<Broker> allBrokerList = getAllBrokerPOsFromDB(clusterPhyId).stream().map(elem -> Broker.buildFrom(elem)).collect(Collectors.toList());
|
||||
brokersCache.put(clusterPhyId, allBrokerList);
|
||||
|
||||
return allBrokerList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user