Skip to content

Commit c653028

Browse files
author
Andrew Or
committed
Package network-yarn and its dependencies
This allows make-distribution to create a small uber jar for the network-yarn module, such that all uses of the Yarn shuffle service can just drop this jar onto the NM classpath and start the shuffle service after configuring the NM to include it.
1 parent 48a19a6 commit c653028

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

make-distribution.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ echo "Spark $VERSION$GITREVSTRING built for Hadoop $SPARK_HADOOP_VERSION" > "$DI
181181
# Copy jars
182182
cp "$FWDIR"/assembly/target/scala*/*assembly*hadoop*.jar "$DISTDIR/lib/"
183183
cp "$FWDIR"/examples/target/scala*/spark-examples*.jar "$DISTDIR/lib/"
184+
cp "$FWDIR"/network/yarn/target/scala*/spark-network-yarn*.jar "$DISTDIR/lib/"
184185

185186
# Copy example sources (needed for python and SQL)
186187
mkdir -p "$DISTDIR/examples/src/main"

network/common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
<groupId>io.netty</groupId>
4242
<artifactId>netty-all</artifactId>
4343
</dependency>
44+
45+
<!-- Provided dependencies -->
4446
<dependency>
4547
<groupId>org.slf4j</groupId>
4648
<artifactId>slf4j-api</artifactId>
4749
</dependency>
48-
49-
<!-- Provided dependencies -->
5050
<dependency>
5151
<groupId>com.google.guava</groupId>
5252
<artifactId>guava</artifactId>

network/shuffle/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
<artifactId>spark-network-common_2.10</artifactId>
4343
<version>${project.version}</version>
4444
</dependency>
45+
46+
<!-- Provided dependencies -->
4547
<dependency>
4648
<groupId>org.slf4j</groupId>
4749
<artifactId>slf4j-api</artifactId>
4850
</dependency>
49-
50-
<!-- Provided dependencies -->
5151
<dependency>
5252
<groupId>com.google.guava</groupId>
5353
<artifactId>guava</artifactId>

network/yarn/pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,38 @@
5454
<build>
5555
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
5656
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-shade-plugin</artifactId>
61+
<configuration>
62+
<shadedArtifactAttached>false</shadedArtifactAttached>
63+
<outputFile>${project.build.directory}/scala-${scala.binary.version}/spark-network-yarn-${project.version}-hadoop${hadoop.version}.jar</outputFile>
64+
<artifactSet>
65+
<includes>
66+
<include>*:*</include>
67+
</includes>
68+
</artifactSet>
69+
<filters>
70+
<filter>
71+
<artifact>*:*</artifact>
72+
<excludes>
73+
<exclude>META-INF/*.SF</exclude>
74+
<exclude>META-INF/*.DSA</exclude>
75+
<exclude>META-INF/*.RSA</exclude>
76+
</excludes>
77+
</filter>
78+
</filters>
79+
</configuration>
80+
<executions>
81+
<execution>
82+
<phase>package</phase>
83+
<goals>
84+
<goal>shade</goal>
85+
</goals>
86+
</execution>
87+
</executions>
88+
</plugin>
89+
</plugins>
5790
</build>
5891
</project>

0 commit comments

Comments
 (0)