You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/09/04 17:41:01 UTC
[GitHub] arina-ielchiieva commented on a change in pull request #1437:
DRILL-6702: Disable CPU Reporting for non-HotSpot JDKs
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