From d8ab8bcfe61da3dfd1fa64590f674465a050d346 Mon Sep 17 00:00:00 2001 From: Robert Metzger Date: Tue, 17 Nov 2015 14:16:27 +0100 Subject: [PATCH] [FLINK-3032] Fix jackson-core dependency conflict with Hadoop 2.7.1. This commit is also changing how we build the "flink-shaded-hadoop" artifact. In the past, we were including all Hadoop dependencies into a fat jar, without relocating all of them. Maven was not able to see Hadoop's dependencies and classes ended up in the classpath multiple times. With this change, only shaded Hadoop dependencies are included into the jar. The shade plugin will also remove only the shaded dependencies from the pom file. --- .travis.yml | 2 +- .../runtime/util/EnvironmentInformation.java | 2 ++ flink-shaded-hadoop/pom.xml | 12 ++++++++++++ pom.xml | 19 +++++++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4cbb256ffd0b1..de27987c9f0ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ language: java matrix: include: - jdk: "oraclejdk8" - env: PROFILE="-Dhadoop.version=2.7.0 -Dscala-2.11 -Pinclude-tez -Pinclude-yarn-tests" + env: PROFILE="-Dhadoop.version=2.7.1 -Dscala-2.11 -Pinclude-tez -Pinclude-yarn-tests" - jdk: "oraclejdk8" env: PROFILE="-Dhadoop.version=2.5.0 -Pinclude-yarn-tests" - jdk: "openjdk7" diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java index b8519b09f76e1..687f1a57a89f7 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java @@ -320,6 +320,8 @@ public static void logEnvironmentInfo(Logger log, String componentName, String[] } } + log.info(" Classpath: " + System.getProperty("java.class.path")); + log.info("--------------------------------------------------------------------------------"); } } diff --git a/flink-shaded-hadoop/pom.xml b/flink-shaded-hadoop/pom.xml index 1d405e3860628..7d54ef9b1a8f0 100644 --- a/flink-shaded-hadoop/pom.xml +++ b/flink-shaded-hadoop/pom.xml @@ -72,6 +72,7 @@ under the License. false true ${project.basedir}/target/dependency-reduced-pom.xml + true @@ -101,6 +102,17 @@ under the License. + + + com.google.guava:* + com.google.protobuf:* + com.google.code.findbugs:* + asm:asm + io.netty:netty:* + org.apache.curator:* + org.apache.hadoop:* + + com.google diff --git a/pom.xml b/pom.xml index 95c7b6e6ff8bb..aedae481e7d38 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ under the License. 0.6.1 3.4.6 2.8.0 + 2.4.2 @@ -350,6 +351,24 @@ under the License. httpclient 4.2 + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} +