spark driver not found

╄→尐↘猪︶ㄣ 提交于 2019-12-02 11:01:05

问题


I am trying to write dataframe to sqlserver using spark. I am using the method write for dataframewriter to write to sql server. Using DriverManager.getConnection I am able to get connection of sqlserver and able to write but when using jdbc method and passing uri I am getting "No suitable driver found". I have passed the jtds jar in the --jars in spark-shell. Spark version : 1.4


回答1:


The issue is that spark is not finding driver jar file. So download jar and place in all worker nodes of spark cluster on the same path and add this path to SPARK_CLASSPATH in spark-env.sh file as follow

SPARK_CLASSPATH=/home/mysql-connector-java-5.1.6.jar

hope it will help



来源:https://stackoverflow.com/questions/31381975/spark-driver-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!