提交 344cec19 编写于 作者: W wyb 提交者: EricZeng

[Bugfix]connector指标采集算最大值错误(#836)

上级 6ef365e2
......@@ -312,8 +312,8 @@ public class ConnectorMetricServiceImpl extends BaseConnectorMetricService imple
return Result.buildFailure(NOT_EXIST);
}
Float sum = ret.getData().stream().max((a, b) -> a.getMetric(metric).compareTo(b.getMetric(metric))).get().getMetric(metric);
ConnectorMetrics connectorMetrics = ConnectorMetrics.initWithMetric(connectClusterId, connectorName, metric, sum / ret.getData().size());
Float max = ret.getData().stream().max((a, b) -> a.getMetric(metric).compareTo(b.getMetric(metric))).get().getMetric(metric);
ConnectorMetrics connectorMetrics = ConnectorMetrics.initWithMetric(connectClusterId, connectorName, metric, max);
return Result.buildSuc(connectorMetrics);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册