Skip to content

Commit 19f0710

Browse files
committed
More code review feedback
1 parent 961452d commit 19f0710

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

bin/compute-classpath.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ fi
5050
if [ -n "$SPARK_PREPEND_CLASSES" ]; then
5151
echo "NOTE: SPARK_PREPEND_CLASSES is set, placing locally compiled Spark"\
5252
"classes ahead of assembly." >&2
53+
# Spark classes
5354
CLASSPATH="$CLASSPATH:$FWDIR/core/target/scala-$SPARK_SCALA_VERSION/classes"
54-
CLASSPATH="$CLASSPATH:$FWDIR/core/target/jars/*"
5555
CLASSPATH="$CLASSPATH:$FWDIR/repl/target/scala-$SPARK_SCALA_VERSION/classes"
5656
CLASSPATH="$CLASSPATH:$FWDIR/mllib/target/scala-$SPARK_SCALA_VERSION/classes"
5757
CLASSPATH="$CLASSPATH:$FWDIR/bagel/target/scala-$SPARK_SCALA_VERSION/classes"
@@ -63,6 +63,8 @@ if [ -n "$SPARK_PREPEND_CLASSES" ]; then
6363
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive/target/scala-$SPARK_SCALA_VERSION/classes"
6464
CLASSPATH="$CLASSPATH:$FWDIR/sql/hive-thriftserver/target/scala-$SPARK_SCALA_VERSION/classes"
6565
CLASSPATH="$CLASSPATH:$FWDIR/yarn/stable/target/scala-$SPARK_SCALA_VERSION/classes"
66+
# Jars for shaded deps in their original form (copied here during build)
67+
CLASSPATH="$CLASSPATH:$FWDIR/core/target/jars/*"
6668
fi
6769

6870
# Use spark-assembly jar from either RELEASE or assembly directory

core/pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,19 +361,24 @@
361361
<groupId>org.apache.maven.plugins</groupId>
362362
<artifactId>maven-dependency-plugin</artifactId>
363363
<executions>
364+
<!-- When using SPARK_PREPEND_CLASSES Spark classes compiled locally don't use
365+
shaded deps. So here we store jars in their original form which are added
366+
when the classpath is computed. -->
364367
<execution>
365368
<id>copy-dependencies</id>
366369
<phase>package</phase>
367370
<goals>
368371
<goal>copy-dependencies</goal>
369372
</goals>
370-
<configuration>
373+
<configuration>
371374
<outputDirectory>${project.build.directory}</outputDirectory>
372375
<overWriteReleases>false</overWriteReleases>
373376
<overWriteSnapshots>false</overWriteSnapshots>
374377
<overWriteIfNewer>true</overWriteIfNewer>
375378
<useSubDirectoryPerType>true</useSubDirectoryPerType>
376-
<includeArtifactIds>guava</includeArtifactIds>
379+
<includeArtifactIds>
380+
guava,jetty-io,jetty-http,jetty-plus,jetty-util,jetty-server
381+
</includeArtifactIds>
377382
<silent>true</silent>
378383
</configuration>
379384
</execution>

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@
339339
</dependency>
340340

341341
<!-- Shaded deps marked as provided. These are promoted to compile scope
342-
in spark-core so that we only have one copy of the shaded dependency. -->
342+
in the modules where we want the shaded classes to appear in the
343+
associated jar. -->
343344
<dependency>
344345
<groupId>org.eclipse.jetty</groupId>
345346
<artifactId>jetty-http</artifactId>

0 commit comments

Comments
 (0)