You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/11/26 10:23:32 UTC

[GitHub] [samza] bkonold commented on a change in pull request #1223: SAMZA-2397: Updating gauge-val function on newGauge on same metric name

bkonold commented on a change in pull request #1223: SAMZA-2397: Updating gauge-val function on newGauge on same metric name
URL: https://github.com/apache/samza/pull/1223#discussion_r350653911
 
 

 ##########
 File path: samza-api/src/main/java/org/apache/samza/metrics/MetricsRegistry.java
 ##########
 @@ -64,6 +64,17 @@
    */
   <T> Gauge<T> newGauge(String group, Gauge<T> value);
 
+  /**
+   * Register an existing {@link org.apache.samza.metrics.Gauge}
+   * @param group Group for this Gauge
+   * @param value Initial value for the Gauge
+   * @param <T> Type the Gauge will be wrapping
+   * @param overrideExistingGauge Overwrite any existing gauges present for the same group and gauge
+   * @return Gauge was registered
+   */
+  <T> Gauge<T> newGauge(String group, Gauge<T> value, Boolean overrideExistingGauge);
 
 Review comment:
   Are we defining a new method here with the additional parameter to avoid a large code change in adding a boolean to the definition above?
   
   Wondering whether the two methods will coexist long term or if we see a way to unify eventually.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services