Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-8446

Incorrect use of OperatingSystemMXBean

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.1
    • 1.21.2
    • None
    • None

    Description

      Context : 

      In Drill "CpuGaugeSet" class, we use an internal class instead of a public class : com.sun.management.OperatingSystemMXBean;

      This can result to a NoClassDefFoundError:

       

      To do : 

      Replace the private class "com.sun.managemenet.OperatingSystemMXBean" with "java.lang.management.OperatingSystemMXBean",

       

      Kind regards,

      Mahmoud

       

      Attachments

        1. image-2023-07-04-15-36-42-905.png
          54 kB
          Mahmoud Ouali Alami
        2. image-2023-07-04-16-24-59-662.png
          22 kB
          Mahmoud Ouali Alami

        Issue Links

          Activity

            githubbot ASF GitHub Bot added a comment -

            jnturton opened a new pull request, #2843:
            URL: https://github.com/apache/drill/pull/2843

            1. DRILL-8446(https://issues.apache.org/jira/browse/DRILL-8446): Incorrect use of OperatingSystemMXBean
              1. Description

            Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process.

            Even though code to handle non-Sun/Oracle runtimes for the OperatingSystemMXBean was present, it would still cause them to attempt to load a class from com.sun.management causing a NoClassDefFoundError.

              1. Documentation
                N/A
              1. Testing
                Launch Drill and check the affected gauges in
            • OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1, mixed mode, sharing)
            • IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230817_56476 (JIT enabled, AOT enabled)
            githubbot ASF GitHub Bot added a comment - jnturton opened a new pull request, #2843: URL: https://github.com/apache/drill/pull/2843 DRILL-8446 ( https://issues.apache.org/jira/browse/DRILL-8446): Incorrect use of OperatingSystemMXBean Description Simplify CpuGaugeSet fixing the non-Sun/Oracle code path in the process. Even though code to handle non-Sun/Oracle runtimes for the OperatingSystemMXBean was present, it would still cause them to attempt to load a class from com.sun.management causing a NoClassDefFoundError. Documentation N/A Testing Launch Drill and check the affected gauges in OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1, mixed mode, sharing) IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230817_56476 (JIT enabled, AOT enabled)
            githubbot ASF GitHub Bot added a comment -

            jnturton commented on PR #2843:
            URL: https://github.com/apache/drill/pull/2843#issuecomment-1797131001

            > LGTM +1
            >
            > @jnturton Does this fix the Splunk flaky test?

            Hopefully.

            githubbot ASF GitHub Bot added a comment - jnturton commented on PR #2843: URL: https://github.com/apache/drill/pull/2843#issuecomment-1797131001 > LGTM +1 > > @jnturton Does this fix the Splunk flaky test? Hopefully.
            githubbot ASF GitHub Bot added a comment -

            jnturton merged PR #2843:
            URL: https://github.com/apache/drill/pull/2843

            githubbot ASF GitHub Bot added a comment - jnturton merged PR #2843: URL: https://github.com/apache/drill/pull/2843

            People

              dzamo James Turton
              oualiala Mahmoud Ouali Alami
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: