Browse Source

[livy] Allow process sessions to add to the driver classpaths

Erick Tryzelaar 10 years ago
parent
commit
2ddfdb589b

+ 6 - 0
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/sessions/ProcessSession.scala

@@ -12,6 +12,7 @@ object ProcessSession extends Logging {
 
 
   val CONF_LIVY_REPL_JAR = "livy.repl.jar"
   val CONF_LIVY_REPL_JAR = "livy.repl.jar"
   val CONF_LIVY_REPL_CALLBACK_URL = "livy.repl.callback-url"
   val CONF_LIVY_REPL_CALLBACK_URL = "livy.repl.callback-url"
+  val CONF_LIVY_REPL_DRIVER_CLASS_PATH = "livy.repl.driverClassPath"
 
 
   def create(livyConf: LivyConf, id: String, lang: String): Session = {
   def create(livyConf: LivyConf, id: String, lang: String): Session = {
     val process = startProcess(livyConf, id, lang)
     val process = startProcess(livyConf, id, lang)
@@ -31,6 +32,11 @@ object ProcessSession extends Logging {
       args += javaOpts
       args += javaOpts
     }
     }
 
 
+    livyConf.getOption(CONF_LIVY_REPL_DRIVER_CLASS_PATH).foreach { case extraClassPath =>
+      args += "--driver-class-path"
+      args += extraClassPath
+    }
+
     args += livyJar(livyConf)
     args += livyJar(livyConf)
     args += lang
     args += lang