You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by rm...@apache.org on 2015/11/19 17:40:28 UTC

flink git commit: [FLINK-3032] Fix jackson-core dependency conflict with Hadoop 2.7.1.

Repository: flink
Updated Branches:
  refs/heads/master 93622001e -> d8ab8bcfe


[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.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/d8ab8bcf
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d8ab8bcf
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d8ab8bcf

Branch: refs/heads/master
Commit: d8ab8bcfe61da3dfd1fa64590f674465a050d346
Parents: 9362200
Author: Robert Metzger <rm...@apache.org>
Authored: Tue Nov 17 14:16:27 2015 +0100
Committer: Robert Metzger <rm...@apache.org>
Committed: Thu Nov 19 17:31:33 2015 +0100

----------------------------------------------------------------------
 .travis.yml                                      |  2 +-
 .../runtime/util/EnvironmentInformation.java     |  2 ++
 flink-shaded-hadoop/pom.xml                      | 12 ++++++++++++
 pom.xml                                          | 19 +++++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d8ab8bcf/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 4cbb256..de27987 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"

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ab8bcf/flink-runtime/src/main/java/org/apache/flink/runtime/util/EnvironmentInformation.java
----------------------------------------------------------------------
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 b8519b0..687f1a5 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 class EnvironmentInformation {
 				}
 			}
 
+			log.info(" Classpath: " + System.getProperty("java.class.path"));
+
 			log.info("--------------------------------------------------------------------------------");
 		}
 	}

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ab8bcf/flink-shaded-hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/flink-shaded-hadoop/pom.xml b/flink-shaded-hadoop/pom.xml
index 1d405e3..7d54ef9 100644
--- a/flink-shaded-hadoop/pom.xml
+++ b/flink-shaded-hadoop/pom.xml
@@ -72,6 +72,7 @@ under the License.
 							<shadedArtifactAttached>false</shadedArtifactAttached>
 							<createDependencyReducedPom>true</createDependencyReducedPom>
 							<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+							<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
 							<filters>
 								<!-- Exclude signatures -->
 								<filter>
@@ -101,6 +102,17 @@ under the License.
 								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
 								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
 							</transformers>
+							<artifactSet>
+								<includes>
+									<include>com.google.guava:*</include>
+									<include>com.google.protobuf:*</include>
+									<include>com.google.code.findbugs:*</include>
+									<include>asm:asm</include>
+									<include>io.netty:netty:*</include>
+									<include>org.apache.curator:*</include>
+									<include>org.apache.hadoop:*</include>
+								</includes>
+							</artifactSet>
 							<relocations>
 								<relocation>
 									<pattern>com.google</pattern>

http://git-wip-us.apache.org/repos/asf/flink/blob/d8ab8bcf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 95c7b6e..aedae48 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,6 +100,7 @@ under the License.
 		<tez.version>0.6.1</tez.version>
 		<zookeeper.version>3.4.6</zookeeper.version>
 		<curator.version>2.8.0</curator.version>
+		<jackson.version>2.4.2</jackson.version>
 	</properties>
 
 	<dependencies>
@@ -350,6 +351,24 @@ under the License.
 				<artifactId>httpclient</artifactId>
 				<version>4.2</version>
 			</dependency>
+
+			<dependency>
+				<groupId>com.fasterxml.jackson.core</groupId>
+				<artifactId>jackson-core</artifactId>
+				<version>${jackson.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.fasterxml.jackson.core</groupId>
+				<artifactId>jackson-databind</artifactId>
+				<version>${jackson.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.fasterxml.jackson.core</groupId>
+				<artifactId>jackson-annotations</artifactId>
+				<version>${jackson.version}</version>
+			</dependency>
 		</dependencies>
 	</dependencyManagement>