Skip to content

Commit

Permalink
[FLINK-5998] Un-fat Hadoop from Flink fat jar.
Browse files Browse the repository at this point in the history
This closes apache#3604
  • Loading branch information
Haohui Mai authored and rmetzger committed May 5, 2017
1 parent 981dea4 commit 43fa507
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
21 changes: 21 additions & 0 deletions flink-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ under the License.
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-hadoop2</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- end optional Flink libraries -->
</dependencies>

Expand Down Expand Up @@ -404,6 +411,20 @@ under the License.
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>lib</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assemblies/lib.xml</descriptor>
</descriptors>
<finalName>flink-${project.version}-bin</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>

Expand Down
39 changes: 39 additions & 0 deletions flink-dist/src/main/assemblies/lib.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http:https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<assembly
xmlns="http:https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http:https://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>lib</id>
<formats>
<format>dir</format>
</formats>

<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>flink-${project.version}</baseDirectory>

<files>
<file>
<source>../flink-shaded-hadoop/flink-shaded-hadoop2/target/flink-shaded-hadoop2-${project.version}.jar</source>
<outputDirectory>lib/</outputDirectory>
<destName>flink-shaded-hadoop2-${project.version}.jar</destName>
<fileMode>0644</fileMode>
</file>
</files>
</assembly>
7 changes: 7 additions & 0 deletions flink-dist/src/main/assemblies/opt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,12 @@
<destName>flink-metrics-statsd-${project.version}.jar</destName>
<fileMode>0644</fileMode>
</file>

<file>
<source>../flink-shaded-hadoop/flink-shaded-hadoop2/target/flink-shaded-hadoop2-${project.version}.jar</source>
<outputDirectory>opt/</outputDirectory>
<destName>flink-shaded-hadoop2-${project.version}.jar</destName>
<fileMode>0644</fileMode>
</file>
</files>
</assembly>

0 comments on commit 43fa507

Please sign in to comment.