From 81910d1958fea82ac70abd8ec65cd0e7748b209c Mon Sep 17 00:00:00 2001 From: zengqiao Date: Mon, 31 Oct 2022 14:55:22 +0800 Subject: [PATCH] =?UTF-8?q?[Hotfix]=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E9=9B=86=E7=BE=A4=E6=97=B6=EF=BC=8C=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=A9=BA=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/cluster/impl/MultiClusterPhyManagerImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/MultiClusterPhyManagerImpl.java b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/MultiClusterPhyManagerImpl.java index 75741d8f..9d1f7e33 100644 --- a/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/MultiClusterPhyManagerImpl.java +++ b/km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl/MultiClusterPhyManagerImpl.java @@ -84,16 +84,16 @@ public class MultiClusterPhyManagerImpl implements MultiClusterPhyManager { ClusterPhysHealthState physState = new ClusterPhysHealthState(clusterPhyList.size()); for (ClusterPhy clusterPhy: clusterPhyList) { ClusterMetrics metrics = clusterMetricService.getLatestMetricsFromCache(clusterPhy.getId()); - Integer state = metrics.getMetric(ClusterMetricVersionItems.CLUSTER_METRIC_HEALTH_STATE).intValue(); + Float state = metrics.getMetric(ClusterMetricVersionItems.CLUSTER_METRIC_HEALTH_STATE); if (state == null) { physState.setUnknownCount(physState.getUnknownCount() + 1); - } else if (state.equals(HealthStateEnum.GOOD.getDimension())) { + } else if (state.intValue() == HealthStateEnum.GOOD.getDimension()) { physState.setGoodCount(physState.getGoodCount() + 1); - } else if (state.equals(HealthStateEnum.MEDIUM.getDimension())) { + } else if (state.intValue() == HealthStateEnum.MEDIUM.getDimension()) { physState.setMediumCount(physState.getMediumCount() + 1); - } else if (state.equals(HealthStateEnum.POOR.getDimension())) { + } else if (state.intValue() == HealthStateEnum.POOR.getDimension()) { physState.setPoorCount(physState.getPoorCount() + 1); - } else if (state.equals(HealthStateEnum.DEAD.getDimension())) { + } else if (state.intValue() == HealthStateEnum.DEAD.getDimension()) { physState.setDeadCount(physState.getDeadCount() + 1); } else { physState.setUnknownCount(physState.getUnknownCount() + 1);