...
Spark's default build strategy is to assemble a jar including all of its dependencies. This can be cumbersome when doing iterative development. When developing locally, it is possible to create an assembly jar including all of Spark's dependencies and then re-package only Spark itself when making changes.
Code Block | ||||
---|---|---|---|---|
| ||||
$ sbt/sbt clean assembly # Create a normal assembly $ ./bin/spark-shell # Use spark with the normal assembly $ export SPARK_PREPEND_CLASSES=true $ ./bin/spark-shell # Now it's using compiled classes # ... do some local development ... # $ sbt/sbt compile # ... do some local development ... # $ sbt/sbt compile $ unset SPARK_PREPEND_CLASSES $ ./bin/spark-shell # Back to normal, using Spark classes from the assembly jar # You can also use ~ to let sbt do incremental builds on file changes without running a new sbt session every time $ sbt/sbt ~compile |
Note | |||||||
---|---|---|---|---|---|---|---|
Note: in some earlier versions of Spark, fast local builds used a sbt task called
|
Checking Out Pull Requests
...