Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • flink-shaded-hadoop1 Is for all hadoop 0.2X and 1.XX versions. It contains only only hadoop-core + some dependency exclusions
  • flink-shaded-hadoop2 is for all hadoop versions starting from 2.x. It contains dependencies for hadoop-common, hadoop-hdfs, hadoop-mapreduce-client-core (for the hadoop compatibility stuff in flink-java). This module is only used for the hadoop 2.0.0-alpha build. It contains only some MapReduce interfaces and the HDFS client. It does not contain YARN.
  • flink-shaded-include-yarn This module is for Hadoop 2.2.0+. This module contains the same dependencies as the hadoop2 module above + some dependencies for YARN.
  • flink-shaded-include-yarn-tests This module is like flink-shaded-include-yarn but it contains all classes required for flink-yarn-tests
    . The dependencies are NOT in the 'tests' scope, because the maven-shade-plugin can not relocate them from there. We need this module to consistently shade all required classes when running the tests.

All other modules in flink which need something from hadoop need to depend on the right flink-shaded-hadoop submodule. Therefore the flink-parent pom exposes the shading-artifact.name variable. It is set depending on the requested hadoop dependency set.
To depend on Hadoop, add the following entry to your pom:

Code Block
<dependency>
	<groupId>org.apache.flink</groupId>
	<artifactId>${shading-artifact.name}</artifactId>
	<version>${project.version}</version>
</dependency>

  will take the output of the regular build process (a jar file), add all depending cl 

...