Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support metrics on JDK9 #1236

Merged
merged 5 commits into from Dec 23, 2017
Merged

Support metrics on JDK9 #1236

merged 5 commits into from Dec 23, 2017

Conversation

@arteam
Copy link
Member

@arteam arteam commented Dec 22, 2017

This fixes the issues with running metrics on JDK8 and JDK9:

  • Fix date formatting differences between JDK8 and JDK9 in ConsoleReporter
  • Fix FileDescriptorRatioGauge, so it doesn't use reflection
  • Add the java.xml.bind module to the JCache tests, so it can access JAXB on JDK9
  • Add a JDK9 profile, so we check that we can compile metrics in JDK9
  • Finally, it adds JDK9 to the test matrix on Travis CI.
arteam added 5 commits Dec 22, 2017
Take into account the differences in the output of string representations
of dates in JDK8 and JDK9.

See:
http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-April/005732.html
Remove reflection hacks and access `UnixOperatingSystemMXBean` directly.
Reflection hacks don't work in JDK9 anymore, and the `UnixOperatingSystemMXBean`
is exported since JDK8, so we can directly check the type of the system bean
and calculate the ration of open file descriptors.
We need to add the `java.xml.bind` module to give JCache access to
JAXB.
Makes sure that metrics can be compiled and run on JDK9 without issues.
@arteam arteam force-pushed the 4.0-development branch from ee6fe82 to 2fb8f7d Dec 23, 2017
@arteam arteam merged commit f082dcb into 4.0-development Dec 23, 2017
5 checks passed
5 checks passed
codeclimate All good!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@arteam arteam deleted the jdk9 branch Dec 23, 2017
@arteam arteam added this to the 4.0.0 milestone Dec 24, 2017
dongjoon-hyun added a commit to apache/spark that referenced this pull request Nov 3, 2019
### What changes were proposed in this pull request?

Update the version of dropwizard metrics that Spark uses for metrics to 4.1.x, from 3.2.x.

### Why are the changes needed?

This helps JDK 9+ support, per for example dropwizard/metrics#1236

### Does this PR introduce any user-facing change?

No, although downstream users with custom metrics may be affected.

### How was this patch tested?

Existing tests.

Closes #26332 from srowen/SPARK-29674.

Authored-by: Sean Owen <sean.owen@databricks.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
yingshikong186 pushed a commit to yingshikong186/spark that referenced this pull request Apr 14, 2020
### What changes were proposed in this pull request?

Update the version of dropwizard metrics that Spark uses for metrics to 4.1.x, from 3.2.x.

### Why are the changes needed?

This helps JDK 9+ support, per for example dropwizard/metrics#1236

### Does this PR introduce any user-facing change?

No, although downstream users with custom metrics may be affected.

### How was this patch tested?

Existing tests.

Closes apache#26332 from srowen/SPARK-29674.

Authored-by: Sean Owen <sean.owen@databricks.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant