xianjingfeng commented on code in PR #2113:
URL: 
https://github.com/apache/incubator-uniffle/pull/2113#discussion_r1758031026


##########
common/src/main/java/org/apache/uniffle/common/metrics/SupplierGauge.java:
##########
@@ -49,9 +49,14 @@ class SupplierGauge extends Collector implements 
Collector.Describable {
   @Override
   public List<MetricFamilySamples> collect() {
     List<MetricFamilySamples.Sample> samples = new ArrayList<>();
+    T lastValue = supplier.get();
+    if (lastValue == null) {
+      LOG.warn("SupplierGauge {} returned null value or is not number.", 
this.name);

Review Comment:
   ```suggestion
         LOG.warn("SupplierGauge {} returned null value.", this.name);
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to