[ https://issues.apache.org/jira/browse/DRILL-6702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16596833#comment-16596833 ]
ASF GitHub Bot commented on DRILL-6702: --------------------------------------- vrozov 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_r213826580 ########## File path: common/src/main/java/org/apache/drill/exec/metrics/CpuGaugeSet.java ########## @@ -63,7 +72,7 @@ public OperatingSystemLoad(OperatingSystemMXBean osBean) { @Override public Double getValue() { - return osMXBean.getSystemLoadAverage(); + return (osMXBean != null) ? osMXBean.getSystemLoadAverage(): null; Review comment: I am OK with parentheses, but please add a space before `:`. ---------------------------------------------------------------- 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: us...@infra.apache.org > OperatingSystemMXBean class cast exception when loaded under IBM JVM > -------------------------------------------------------------------- > > Key: DRILL-6702 > URL: https://issues.apache.org/jira/browse/DRILL-6702 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.14.0 > Reporter: Rob Wu > Assignee: Kunal Khatua > Priority: Minor > Fix For: 1.15.0 > > > Related to: https://issues.apache.org/jira/browse/DRILL-6289 > > [https://github.com/apache/drill/blob/1.14.0/common/src/main/java/org/apache/drill/exec/metrics/CpuGaugeSet.java#L28|https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_drill_blob_1.14.0_common_src_main_java_org_apache_drill_exec_metrics_CpuGaugeSet.java-23L28&d=DwMFAg&c=cskdkSMqhcnjZxdQVpwTXg&r=-cT6otg6lpT_XkmYy7yg3A&m=f8a5MyR85-7Ns3KmymU7PI8Sk6qW8vRa9HJIa0-npNA&s=mpztPtwrTzNkgLcUORZdl5LQ6gyP5iAf3umFzgdOMeI&e=] > > Exception in thread "main" java.lang.ExceptionInInitializerError > at java.lang.J9VMInternals.ensureError(J9VMInternals.java:141) > at > java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:130) > at > org.apache.drill.exec.metrics.DrillMetrics.getRegistry(DrillMetrics.java:111) > at > org.apache.drill.exec.memory.AllocationManager.<clinit>(AllocationManager.java:64) > at > org.apache.drill.exec.memory.BaseAllocator.<clinit>(BaseAllocator.java:48) > at > org.apache.drill.exec.memory.RootAllocatorFactory.newRoot(RootAllocatorFactory.java:45) > at > org.apache.drill.exec.memory.RootAllocatorFactory.newRoot(RootAllocatorFactory.java:40) > ... > Caused by: java.lang.ClassCastException: > com.ibm.lang.management.ExtendedOperatingSystem incompatible with > com.sun.management.OperatingSystemMXBean > at org.apache.drill.exec.metrics.CpuGaugeSet.<init>(CpuGaugeSet.java:40) > at > org.apache.drill.exec.metrics.DrillMetrics$RegistryHolder.registerSystemMetrics(DrillMetrics.java:63) > at > org.apache.drill.exec.metrics.DrillMetrics$RegistryHolder.<clinit>(DrillMetrics.java:53) -- This message was sent by Atlassian JIRA (v7.6.3#76005)