arina-ielchiieva commented on a change in pull request #1437: DRILL-6702: 
Disable CPU Reporting for non-HotSpot JDKs
URL: https://github.com/apache/drill/pull/1437#discussion_r215004905
 
 

 ##########
 File path: common/src/main/java/org/apache/drill/exec/metrics/CpuGaugeSet.java
 ##########
 @@ -49,6 +51,15 @@ public CpuGaugeSet() {
     metric.put("drillbit.uptime", new DrillbitUptime(rtMXBean));
     return metric;
   }
+
+  private static OperatingSystemMXBean getOSMXBeanForCpuMetrics() {
+    try {
+      return (OperatingSystemMXBean) 
ManagementFactory.getOperatingSystemMXBean();
+    } catch (Exception ex) {
 
 Review comment:
   Not sure how it can throw other exception instead of class cast. I liked 
version with more narrow exception better.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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