enixon commented on a change in pull request #854: ZOOKEEPER-3143 Pluggable 
metrics system for ZooKeeper - Data Collection on Server
URL: https://github.com/apache/zookeeper/pull/854#discussion_r274077022
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
 ##########
 @@ -392,8 +392,12 @@ public CommandResponse run(ZooKeeperServer zkServer, 
Map<String, String> kwargs)
                 response.put("observer_master_id", 
((ObserverZooKeeperServer)zkServer).getObserver().getLearnerMasterId());
             }
 
-            response.putAll(ServerMetrics.getAllValues());
-
+            ServerMetrics.getMetrics()
+                    .getMetricsProvider()
+                    .dump(
+                    (metric, value) -> {
 
 Review comment:
   For any automated system, it probably doesn't matter. I'm just thinking that 
a human operator would appreciate consistency between different iterations of 
the command - particularly if the whole list gets long. :)
   
   Not a blocker in any sense, just a convenience factor thought.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to