val classes = Seq( getClass, // To get the jar with our own code. classOf[mysql.jdbc.Driver] // To get the connector. ) val jars = classes.map(_.getProtectionDomain().getCodeSource().getLocation().getPath()) val conf = new SparkConf().setJars(jars)
val classes = Seq( getClass, // To get the jar with our own code. classOf[mysql.jdbc.Driver] // To get the connector. ) val jars = classes.map(_.getProtectionDomain().getCodeSource().getLocation().getPath()) val conf = new SparkConf().setJars(jars)