File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
km-biz/src/main/java/com/xiaojukeji/know/streaming/km/biz/cluster/impl Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -84,16 +84,16 @@ public ClusterPhysHealthState getClusterPhysHealthState() {
8484 ClusterPhysHealthState physState = new ClusterPhysHealthState (clusterPhyList .size ());
8585 for (ClusterPhy clusterPhy : clusterPhyList ) {
8686 ClusterMetrics metrics = clusterMetricService .getLatestMetricsFromCache (clusterPhy .getId ());
87- Integer state = metrics .getMetric (ClusterMetricVersionItems .CLUSTER_METRIC_HEALTH_STATE ). intValue ( );
87+ Float state = metrics .getMetric (ClusterMetricVersionItems .CLUSTER_METRIC_HEALTH_STATE );
8888 if (state == null ) {
8989 physState .setUnknownCount (physState .getUnknownCount () + 1 );
90- } else if (state .equals ( HealthStateEnum .GOOD .getDimension () )) {
90+ } else if (state .intValue () == HealthStateEnum .GOOD .getDimension ()) {
9191 physState .setGoodCount (physState .getGoodCount () + 1 );
92- } else if (state .equals ( HealthStateEnum .MEDIUM .getDimension () )) {
92+ } else if (state .intValue () == HealthStateEnum .MEDIUM .getDimension ()) {
9393 physState .setMediumCount (physState .getMediumCount () + 1 );
94- } else if (state .equals ( HealthStateEnum .POOR .getDimension () )) {
94+ } else if (state .intValue () == HealthStateEnum .POOR .getDimension ()) {
9595 physState .setPoorCount (physState .getPoorCount () + 1 );
96- } else if (state .equals ( HealthStateEnum .DEAD .getDimension () )) {
96+ } else if (state .intValue () == HealthStateEnum .DEAD .getDimension ()) {
9797 physState .setDeadCount (physState .getDeadCount () + 1 );
9898 } else {
9999 physState .setUnknownCount (physState .getUnknownCount () + 1 );
You can’t perform that action at this time.
0 commit comments