Skip to content

Commit

Permalink
spark jar hell
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalii Cherkashyn authored Sep 24, 2020
1 parent 9764fe7 commit 837652d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ GraphLoader.edgeListFile(sc, path_to_file)
```



# Scala examples
```
val input = sc.textFile("data/stations/*")
Expand All @@ -689,6 +688,7 @@ spark.driver.extraClassPath pathOfJarsWithCommaSeprated
* after start
scala> :require /path/to/file.jar


# spark shell, spark-shell, spark2-shell
## local execution
```
Expand Down Expand Up @@ -735,6 +735,11 @@ spark-shell --master local --deploy-mode client \
...
```

## avoid jar hell, library shadowing, different versions of libraries usage
https://cloud.google.com/blog/products/data-analytics/managing-java-dependencies-apache-spark-applications-cloud-dataproc
* shaded jar
* maven relocations

## execute shell with additional parameters
```
spark-shell --jars "lightning-1.5.0-SNAPSHOT-3a517e-jar-with-dependencies.jar" \
Expand Down

0 comments on commit 837652d

Please sign in to comment.