You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/12/14 08:01:16 UTC

[GitHub] [pinot] zhtaoxiang commented on a diff in pull request #9961: allow gauge stored in metric registry to be updated

zhtaoxiang commented on code in PR #9961:
URL: https://github.com/apache/pinot/pull/9961#discussion_r1048125622


##########
pinot-spi/src/main/java/org/apache/pinot/spi/metrics/PinotGauge.java:
##########
@@ -36,10 +38,26 @@
 
   Object getGauge();
 
+  /**
+   * Sets the gauge value.
+   * @param value the gauge value to set.
+   */
+  default void setValue(T value) {
+    throw new RuntimeException("setValue is not implemented");
+  }
+
+  /**
+   * Sets the gauge value supplier.
+   * @param valueSupplier the gauge value supplier to set.
+   */
+  default void setValueSupplier(Supplier<T> valueSupplier) {

Review Comment:
   that's a good suggestion! updated the code.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org