You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/08/12 18:31:02 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #378: Make the reservoir used in ZkClientPathMonitor metric configurable.

jiajunwang commented on a change in pull request #378: Make the reservoir used in ZkClientPathMonitor metric configurable.
URL: https://github.com/apache/helix/pull/378#discussion_r313065938
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterEventMonitor.java
 ##########
 @@ -57,7 +58,9 @@ public ClusterEventMonitor(ClusterStatusMonitor clusterStatusMonitor, String pha
     _clusterStatusMonitor = clusterStatusMonitor;
 
     _duration = new HistogramDynamicMetric("DurationGauge", new Histogram(
-        new SlidingTimeWindowArrayReservoir(DEFAULT_RESET_INTERVAL_MS, TimeUnit.MILLISECONDS)));
+        new SlidingTimeWindowArrayReservoir(HelixUtil
+            .getSystemPropertyAsLong(RESET_INTERVAL_SYSTEM_PROPERTY_KEY, DEFAULT_RESET_INTERVAL_MS),
 
 Review comment:
   To avoid duplicate code, can you create a protected method in the parent class DynamicMBeanProvider to get the interval?
   The logic looks fine to me.
   
   Note the RESET_INTERVAL_SYSTEM_PROPERTY_KEY and DEFAULT_RESET_INTERVAL_MS are already there.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org