Spark Unable to find JDBC Driver

前端 未结 10 2219
栀梦
栀梦 2020-11-28 08:47

So I\'ve been using sbt with assembly to package all my dependencies into a single jar for my spark jobs. I\'ve got several jobs where I was using c3p0 to setu

10条回答
  •  醉酒成梦
    2020-11-28 09:09

    I add the jar file to the SPARK_CLASSPATH in spark-env.sh, it works.

    export SPARK_CLASSPATH=$SPARK_CLASSPATH:/local/spark-1.6.3-bin-hadoop2.6/lib/mysql-connector-java-5.1.40-bin.jar
    

提交回复
热议问题