zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #918: ZOOKEEPER-3366: Pluggable metrics system for ZooKeeper - move remaining metrics to MetricsProvider
Date Fri, 26 Apr 2019 20:41:37 GMT
eolivelli commented on a change in pull request #918: ZOOKEEPER-3366: Pluggable metrics system
for ZooKeeper - move remaining metrics to MetricsProvider
URL: https://github.com/apache/zookeeper/pull/918#discussion_r279097196
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java
 ##########
 @@ -322,71 +315,13 @@ public MonitorCommand() {
 
         @Override
         public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs)
{
-            ZKDatabase zkdb = zkServer.getZKDatabase();
             ServerStats stats = zkServer.serverStats();
 
             CommandResponse response = initializeResponse();
 
             response.put("version", Version.getFullVersion());
 
-            response.put("avg_latency", stats.getAvgLatency());
-            response.put("max_latency", stats.getMaxLatency());
-            response.put("min_latency", stats.getMinLatency());
-
-            response.put("packets_received", stats.getPacketsReceived());
-            response.put("packets_sent", stats.getPacketsSent());
-            response.put("num_alive_connections", stats.getNumAliveClientConnections());
-
-            response.put("outstanding_requests", stats.getOutstandingRequests());
-            response.put("uptime", stats.getUptime());
-
             response.put("server_state", stats.getServerState());
-            response.put("znode_count", zkdb.getNodeCount());
-
-            response.put("watch_count", zkdb.getDataTree().getWatchCount());
-            response.put("ephemerals_count", zkdb.getDataTree().getEphemeralsCount());
-            response.put("approximate_data_size", zkdb.getDataTree().cachedApproximateDataSize());
-
-            response.put("global_sessions", zkdb.getSessionCount());
-            response.put("local_sessions",
-                    zkServer.getSessionTracker().getLocalSessionCount());
-
-            OSMXBean osMbean = new OSMXBean();
-            response.put("open_file_descriptor_count", osMbean.getOpenFileDescriptorCount());
-            response.put("max_file_descriptor_count", osMbean.getMaxFileDescriptorCount());
-            response.put("connection_drop_probability", zkServer.getConnectionDropChance());
-
-            response.put("last_client_response_size", stats.getClientResponseStats().getLastBufferSize());
-            response.put("max_client_response_size", stats.getClientResponseStats().getMaxBufferSize());
-            response.put("min_client_response_size", stats.getClientResponseStats().getMinBufferSize());
-
-            if (zkServer instanceof QuorumZooKeeperServer) {
-                QuorumPeer peer = ((QuorumZooKeeperServer) zkServer).self;
-                response.put("quorum_size", peer.getQuorumSize());
 
 Review comment:
   fixed.
   thanks @enixon
   

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

Mime
View raw message