spark-shell在yarn上卖弄启动时报错The specified datastore driver (“com.mysql.jdbc.Driver“) was not found

在安装好的Hadoop集群和spark集群中安装好hive。但是在利用yarn启动spark-shell时候,报了以下错误:

The specified datastore driver ("com.mysql.jdbc.Driver") was not found 。。。。。

这个时候与找不到了MySQL的驱动,所以需要在spark-defaults.conf中进行指定配置。

spark.executor.extraClassPath     /home/hadoop/jars/mysql-connector-java-5.1.46-bin.jar
spark.driver.extraClassPath       /home/hadoop/jars/mysql-connector-java-5.1.46-bin.jar

然后启动即可:

[bing@hadoop102 spark]$ bin/spark-shell --master yarn

启动成功:

spark-shell在yarn上卖弄启动时报错The specified datastore driver (“com.mysql.jdbc.Driver“) was not found_第1张图片

你可能感兴趣的:(spark,hive)