diff options
author | Sean Owen <sowen@cloudera.com> | 2014-05-10 20:50:40 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-10 20:50:52 -0700 |
commit | c7253daeb567f9340528e3578300a1166167cff0 (patch) | |
tree | e8a010c6cb53bea85e99426412b6c25d90569735 /examples/pom.xml | |
parent | 4e9a0cb4a296b8d68d31e45aa202ec76c126ba8f (diff) | |
download | spark-c7253daeb567f9340528e3578300a1166167cff0.tar.gz spark-c7253daeb567f9340528e3578300a1166167cff0.tar.bz2 spark-c7253daeb567f9340528e3578300a1166167cff0.zip |
SPARK-1789. Multiple versions of Netty dependencies cause FlumeStreamSuite failure
TL;DR is there is a bit of JAR hell trouble with Netty, that can be mostly resolved and will resolve a test failure.
I hit the error described at http://apache-spark-user-list.1001560.n3.nabble.com/SparkContext-startup-time-out-td1753.html while running FlumeStreamingSuite, and have for a short while (is it just me?)
velvia notes:
"I have found a workaround. If you add akka 2.2.4 to your dependencies, then everything works, probably because akka 2.2.4 brings in newer version of Jetty."
There are at least 3 versions of Netty in play in the build:
- the new Flume 1.4.0 dependency brings in io.netty:netty:3.4.0.Final, and that is the immediate problem
- the custom version of akka 2.2.3 depends on io.netty:netty:3.6.6.
- but, Spark Core directly uses io.netty:netty-all:4.0.17.Final
The POMs try to exclude other versions of netty, but are excluding org.jboss.netty:netty, when in fact older versions of io.netty:netty (not netty-all) are also an issue.
The org.jboss.netty:netty excludes are largely unnecessary. I replaced many of them with io.netty:netty exclusions until everything agreed on io.netty:netty-all:4.0.17.Final.
But this didn't work, since Akka 2.2.3 doesn't work with Netty 4.x. Down-grading to 3.6.6.Final across the board made some Spark code not compile.
If the build *keeps* io.netty:netty:3.6.6.Final as well, everything seems to work. Part of the reason seems to be that Netty 3.x used the old `org.jboss.netty` packages. This is less than ideal, but is no worse than the current situation.
So this PR resolves the issue and improves the JAR hell, even if it leaves the existing theoretical Netty 3-vs-4 conflict:
- Remove org.jboss.netty excludes where possible, for clarity; they're not needed except with Hadoop artifacts
- Add io.netty:netty excludes where needed -- except, let akka keep its io.netty:netty
- Change a bit of test code that actually depended on Netty 3.x, to use 4.x equivalent
- Update SBT build accordingly
A better change would be to update Akka far enough such that it agrees on Netty 4.x, but I don't know if that's feasible.
Author: Sean Owen <sowen@cloudera.com>
Closes #723 from srowen/SPARK-1789 and squashes the following commits:
43661b7 [Sean Owen] Update and add Netty excludes to prevent some JAR conflicts that cause test issues
(cherry picked from commit 2b7bd29eb6ee5baf739eec143044ecfc296b9b1f)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>
Diffstat (limited to 'examples/pom.xml')
-rw-r--r-- | examples/pom.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/pom.xml b/examples/pom.xml index 342d7c0742..b7cbb1a8bf 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -107,6 +107,10 @@ <artifactId>netty</artifactId> </exclusion> <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty</artifactId> + </exclusion> + <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> |