Skip to content

Commit 32fd9e1

Browse files
committed
[ZEPPELIN-18] Running pyspark without deploying python libraries to every yarn node
- rebasing
1 parent 3f87f44 commit 32fd9e1

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

spark/pom.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
<akka.group>org.spark-project.akka</akka.group>
5050
<akka.version>2.3.4-spark</akka.version>
51+
52+
<spark.download.url>http://www.apache.org/dist/spark/spark-${spark.version}/spark-${spark.version}.tgz</spark.download.url>
5153
</properties>
5254

5355
<repositories>
@@ -912,6 +914,51 @@
912914
</executions>
913915
</plugin>
914916

917+
<!-- for pyspark -->
918+
<plugin>
919+
<groupId>com.googlecode.maven-download-plugin</groupId>
920+
<artifactId>download-maven-plugin</artifactId>
921+
<version>1.2.1</version>
922+
<executions>
923+
<execution>
924+
<id>download-pyspark-files</id>
925+
<phase>prepare-package</phase>
926+
<goals>
927+
<goal>wget</goal>
928+
</goals>
929+
<configuration>
930+
<url>${spark.download.url}</url>
931+
<unpack>true</unpack>
932+
<outputDirectory>${project.build.directory}/spark-dist</outputDirectory>
933+
</configuration>
934+
</execution>
935+
</executions>
936+
</plugin>
937+
<plugin>
938+
<groupId>org.apache.maven.plugins</groupId>
939+
<artifactId>maven-antrun-plugin</artifactId>
940+
<version>1.7</version>
941+
<executions>
942+
<execution>
943+
<id>download-and-zip-pyspark-files</id>
944+
<phase>package</phase>
945+
<goals>
946+
<goal>run</goal>
947+
</goals>
948+
<configuration>
949+
<target>
950+
<delete dir="${project.build.directory}/../../python" />
951+
<zip destfile="${project.build.directory}/../../python/pyspark.zip"
952+
basedir="${project.build.directory}/spark-dist/spark-${spark.version}/python/pyspark"/>
953+
<copy
954+
file="${project.build.directory}/spark-dist/spark-${spark.version}/python/lib/py4j-0.8.2.1-src.zip"
955+
todir="${project.build.directory}/../../python"/>
956+
</target>
957+
</configuration>
958+
</execution>
959+
</executions>
960+
</plugin>
961+
915962
<!-- Plugin to compile Scala code -->
916963
<plugin>
917964
<groupId>org.scala-tools</groupId>

0 commit comments

Comments
 (0)