jerqi commented on code in PR #9010:
URL: https://github.com/apache/gravitino/pull/9010#discussion_r2493537058
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/metrics/IcebergMetricsManager.java:
##########
@@ -156,21 +160,22 @@ IcebergMetricsStore getIcebergMetricsStore() {
private void writeMetrics() {
while (!Thread.currentThread().isInterrupted()) {
- MetricsReport metricsReport;
+ MetricsReportWrapper metricsReport;
try {
metricsReport = queue.take();
} catch (InterruptedException e) {
LOG.warn("Iceberg Metrics writer thread is interrupted.");
break;
}
- if (metricsReport != null) {
- doRecordMetric(metricsReport);
- }
+
+ doRecordMetric(metricsReport.getNamespace(),
metricsReport.getMetricsReport());
Review Comment:
IDEA suggests to remove this. It says this can't null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]