Scala 如何向spark shell添加库
我有一个我想在spark shell中使用的库,如何添加此库以从spark shell访问? sbt: 马文:Scala 如何向spark shell添加库,scala,maven,apache-spark,spark-shell,Scala,Maven,Apache Spark,Spark Shell,我有一个我想在spark shell中使用的库,如何添加此库以从spark shell访问? sbt: 马文: <dependencies> <!-- Other Dependencies --> <dependency> <groupId>com.github.unsupervise</groupId> <artifactId>spark-tss_2.11</artifactI
<dependencies>
<!-- Other Dependencies -->
<dependency>
<groupId>com.github.unsupervise</groupId>
<artifactId>spark-tss_2.11</artifactId>
<version>0.1.1</version>
</dependency>
</dependencies>
<repositories>
<!-- Other Repositories ... -->
<repository>
<id>bintrayunsupervisemaven</id>
<name>bintray-unsupervise-maven</name>
<url>https://dl.bintray.com/unsupervise/maven/</url>
<layout>default</layout>
</repository>
</repositories>
com.github.unsupervise
spark-tss_2.11
0.1.1
宾特拉尤尼马文
宾托无监督专家
https://dl.bintray.com/unsupervise/maven/
违约
当您在本地有JAR时:
/spark shell--jars pathOfjarsWithCommaSeprated
当二进制工件(JAR)通过工件库(如Maven或Nexus)进行管理时,您将使用工件坐标,如组id、工件id和版本
参考:http//spark.apache.org/docs/latest/rdd programming guide.html#使用shell
/bin/spark shell--master local[4]--packages“com.github.unsupervise:spark-tss_2.11:0.1.1”
使用存储库
和包
参数
spark-shell \
--repositories "https://dl.bintray.com/unsupervise/maven" \
--packages "com.github.unsupervise:spark-tss_2.11:0.1.1"
我没有jar,我只有这两个maven或sbt的讲师。更新了我的答案
spark-shell \
--repositories "https://dl.bintray.com/unsupervise/maven" \
--packages "com.github.unsupervise:spark-tss_2.11:0.1.1"