From aaf10ae3cad85587da996f2ab29ddaeb424056d1 Mon Sep 17 00:00:00 2001 From: weidong_chang <51365967+chang-wd@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:02:16 +0800 Subject: [PATCH] [Feature] #1121 support clearInactiveClusterPhyBrokers --- .../know/streaming/km/biz/cluster/ClusterBrokersManager.java | 2 +- .../km/biz/cluster/impl/ClusterBrokersManagerImpl.java | 4 ++-- .../km/core/service/broker/impl/BrokerServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/ClusterBrokersManager.java b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/ClusterBrokersManager.java index 68a5b7b95..0eba136b1 100644 --- a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/ClusterBrokersManager.java +++ b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/ClusterBrokersManager.java @@ -24,7 +24,7 @@ public interface ClusterBrokersManager { * @param dto 封装分页查询参数对象 * @return 返回获取到的缓存查询结果 & broker 表查询结果并集 */ - PaginationResult deleteInactiveClusterPhyBrokers(Long clusterPhyId, ClusterBrokersOverviewDTO dto); + PaginationResult clearInactiveClusterPhyBrokers(Long clusterPhyId, ClusterBrokersOverviewDTO dto); /** diff --git a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/ClusterBrokersManagerImpl.java b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/ClusterBrokersManagerImpl.java index 3254731d3..d8796dcdd 100644 --- a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/ClusterBrokersManagerImpl.java +++ b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/ClusterBrokersManagerImpl.java @@ -108,8 +108,8 @@ public PaginationResult getClusterPhyBrokersOverview(L } @Override - public PaginationResult deleteInactiveClusterPhyBrokers(Long clusterPhyId, ClusterBrokersOverviewDTO dto) { - brokerService.deleteInactiveClusterPhyBrokers(clusterPhyId); + public PaginationResult clearInactiveClusterPhyBrokers(Long clusterPhyId, ClusterBrokersOverviewDTO dto) { + brokerService.clearInactiveClusterPhyBrokers(clusterPhyId); return this.getClusterPhyBrokersOverview(clusterPhyId, dto); } diff --git a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java index aad774730..105019f74 100644 --- a/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java +++ b/km-core/src/main/java/com/xiaojukeji/know/streaming/km/core/service/broker/impl/BrokerServiceImpl.java @@ -187,7 +187,7 @@ public void clearInactiveClusterPhyBrokers(Long clusterPhyId) { .filter(elem -> elem.getStatus().equals(Constant.DOWN)) .forEach(elem -> brokerDAO.deleteById(elem.getId())); } catch (Exception e) { - log.error("method=deleteInactiveClusterPhyBrokers||clusterPhyId={}||errMsg=exception!", clusterPhyId, e); + log.error("method=clearInactiveClusterPhyBrokers||clusterPhyId={}||errMsg=exception!", clusterPhyId, e); } } @Override