drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] arina-ielchiieva commented on a change in pull request #1437: DRILL-6702: Disable CPU Reporting for non-HotSpot JDKs
Date Tue, 04 Sep 2018 17:41:01 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message