Skip to content

Commit 19b8c71

Browse files
srowendongjoon-hyun
authored andcommitted
[SPARK-29674][CORE] Update dropwizard metrics to 4.1.x for JDK 9+
### 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 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 80a8987 commit 19b8c71

File tree

13 files changed

+485
-16
lines changed

13 files changed

+485
-16
lines changed

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ core/src/main/resources/org/apache/spark/ui/static/bootstrap*
216216
core/src/main/resources/org/apache/spark/ui/static/jsonFormatter*
217217
core/src/main/resources/org/apache/spark/ui/static/vis*
218218
docs/js/vendor/bootstrap.js
219+
external/spark-ganglia-lgpl/src/main/java/com/codahale/metrics/ganglia/GangliaReporter.java
219220

220221

221222
Python Software Foundation License

LICENSE-binary

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ com.vlkan:flatbuffers
243243
com.ning:compress-lzf
244244
io.airlift:aircompressor
245245
io.dropwizard.metrics:metrics-core
246-
io.dropwizard.metrics:metrics-ganglia
247246
io.dropwizard.metrics:metrics-graphite
248247
io.dropwizard.metrics:metrics-json
249248
io.dropwizard.metrics:metrics-jvm
249+
io.dropwizard.metrics:metrics-jmx
250250
org.iq80.snappy:snappy
251251
com.clearspring.analytics:stream
252252
com.jamesmurty.utils:java-xmlbuilder

NOTICE

+13
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,16 @@ The following provides more details on the included cryptographic software:
2626
This software uses Apache Commons Crypto (https://commons.apache.org/proper/commons-crypto/) to
2727
support authentication, and encryption and decryption of data sent across the network between
2828
services.
29+
30+
31+
Metrics
32+
Copyright 2010-2013 Coda Hale and Yammer, Inc.
33+
34+
This product includes software developed by Coda Hale and Yammer, Inc.
35+
36+
This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64,
37+
LongAdder), which was released with the following comments:
38+
39+
Written by Doug Lea with assistance from members of JCP JSR-166
40+
Expert Group and released to the public domain, as explained at
41+
http://creativecommons.org/publicdomain/zero/1.0/

NOTICE-binary

+13
Original file line numberDiff line numberDiff line change
@@ -1515,3 +1515,16 @@ Copyright 2014-2017 The Apache Software Foundation
15151515

15161516
This product includes software developed at
15171517
The Apache Software Foundation (http://www.apache.org/).
1518+
1519+
1520+
Metrics
1521+
Copyright 2010-2013 Coda Hale and Yammer, Inc.
1522+
1523+
This product includes software developed by Coda Hale and Yammer, Inc.
1524+
1525+
This product includes code derived from the JSR-166 project (ThreadLocalRandom, Striped64,
1526+
LongAdder), which was released with the following comments:
1527+
1528+
Written by Doug Lea with assistance from members of JCP JSR-166
1529+
Expert Group and released to the public domain, as explained at
1530+
http://creativecommons.org/publicdomain/zero/1.0/

core/pom.xml

+10
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,16 @@
292292
<dependency>
293293
<groupId>io.dropwizard.metrics</groupId>
294294
<artifactId>metrics-graphite</artifactId>
295+
<exclusions>
296+
<exclusion>
297+
<groupId>com.rabbitmq</groupId>
298+
<artifactId>amqp-client</artifactId>
299+
</exclusion>
300+
</exclusions>
301+
</dependency>
302+
<dependency>
303+
<groupId>io.dropwizard.metrics</groupId>
304+
<artifactId>metrics-jmx</artifactId>
295305
</dependency>
296306
<dependency>
297307
<groupId>com.fasterxml.jackson.core</groupId>

core/src/main/scala/org/apache/spark/metrics/sink/JmxSink.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ package org.apache.spark.metrics.sink
1919

2020
import java.util.Properties
2121

22-
import com.codahale.metrics.{JmxReporter, MetricRegistry}
22+
import com.codahale.metrics.MetricRegistry
23+
import com.codahale.metrics.jmx.JmxReporter
2324

2425
import org.apache.spark.SecurityManager
2526

dev/.rat-excludes

+1
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ announce.tmpl
118118
vote.tmpl
119119
SessionManager.java
120120
SessionHandler.java
121+
GangliaReporter.java

dev/checkstyle-suppressions.xml

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<suppressions>
3131
<suppress checks=".*"
3232
files="core/src/main/java/org/apache/spark/util/collection/TimSort.java"/>
33+
<suppress checks=".*"
34+
files="external/spark-ganglia-lgpl/src/main/java/com/codahale/metrics/ganglia/GangliaReporter.java"/>
3335
<suppress checks=".*"
3436
files="sql/core/src/main/java/org/apache/spark/sql/api.java/*"/>
3537
<suppress checks="LineLength"

dev/deps/spark-deps-hadoop-2.7

+5-4
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ lz4-java-1.6.0.jar
149149
machinist_2.12-0.6.8.jar
150150
macro-compat_2.12-1.1.1.jar
151151
mesos-1.4.0-shaded-protobuf.jar
152-
metrics-core-3.2.6.jar
153-
metrics-graphite-3.2.6.jar
154-
metrics-json-3.2.6.jar
155-
metrics-jvm-3.2.6.jar
152+
metrics-core-4.1.1.jar
153+
metrics-graphite-4.1.1.jar
154+
metrics-jmx-4.1.1.jar
155+
metrics-json-4.1.1.jar
156+
metrics-jvm-4.1.1.jar
156157
minlog-1.3.0.jar
157158
netty-all-4.1.42.Final.jar
158159
objenesis-2.5.1.jar

dev/deps/spark-deps-hadoop-3.2

+5-4
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ lz4-java-1.6.0.jar
179179
machinist_2.12-0.6.8.jar
180180
macro-compat_2.12-1.1.1.jar
181181
mesos-1.4.0-shaded-protobuf.jar
182-
metrics-core-3.2.6.jar
183-
metrics-graphite-3.2.6.jar
184-
metrics-json-3.2.6.jar
185-
metrics-jvm-3.2.6.jar
182+
metrics-core-4.1.1.jar
183+
metrics-graphite-4.1.1.jar
184+
metrics-jmx-4.1.1.jar
185+
metrics-json-4.1.1.jar
186+
metrics-jvm-4.1.1.jar
186187
minlog-1.3.0.jar
187188
mssql-jdbc-6.2.1.jre7.jar
188189
netty-all-4.1.42.Final.jar

external/spark-ganglia-lgpl/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
<artifactId>spark-core_${scala.binary.version}</artifactId>
4040
<version>${project.version}</version>
4141
</dependency>
42-
4342
<dependency>
44-
<groupId>io.dropwizard.metrics</groupId>
45-
<artifactId>metrics-ganglia</artifactId>
43+
<groupId>info.ganglia.gmetric4j</groupId>
44+
<artifactId>gmetric4j</artifactId>
45+
<version>1.0.10</version>
4646
</dependency>
4747
</dependencies>
4848
</project>

0 commit comments

Comments
 (0)