maedhroz commented on code in PR #3742:
URL: https://github.com/apache/cassandra/pull/3742#discussion_r1890814545


##########
src/java/org/apache/cassandra/tools/NodeProbe.java:
##########
@@ -1892,7 +1895,73 @@ public Object getThreadPoolMetric(String pathName, 
String poolName, String metri
       }
     }
 
-    /**
+    public Object getSaiMetric(String ks, String cf, String metricName)
+    {
+        try
+        {
+            String scope = getSaiMetricScope(metricName);
+            String objectNameStr = 
String.format("org.apache.cassandra.metrics:type=StorageAttachedIndex,keyspace=%s,table=%s,scope=%s,name=%s",ks,
 cf, scope, metricName);
+            ObjectName oName = new ObjectName(objectNameStr);
+
+            Set<ObjectName> matchingMBeans = mbeanServerConn.queryNames(oName, 
null);
+            if (matchingMBeans.isEmpty())
+                return null;
+
+            return getSaiMetricValue(metricName, oName);
+        } catch (MalformedObjectNameException e)

Review Comment:
   nit/formatting: For everything below, newlines after `}` and before the 
`catch`



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to