Spark Unable to find JDBC Driver

前端 未结 10 2215
栀梦
栀梦 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:16

    I had the same problem running jobs over a Mesos cluster in cluster mode.

    To use a JDBC driver is necessary to add the dependency to the system classpath not to the framework classpath. I only found the way of doing it by adding the dependency in the file spark-defaults.conf in every instance of the cluster.

    The properties to add are spark.driver.extraClassPath and spark.executor.extraClassPath and the path must be in the local file system.

提交回复
热议问题