Skip to content

Commit

Permalink
[livy] Thread sessions aren't being used and weren't worthwhile
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick Tryzelaar committed May 21, 2015
1 parent 86bd101 commit 16fa570
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 153 deletions.
2 changes: 1 addition & 1 deletion apps/spark/java/conf/livy-defaults.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# What port to start the server on. Defaults to 8998.
# livy.server.port = 8998

# What session factory to use. The options are `thread`, `process`, and `yarn`.
# What session factory to use. The options are `process` and `yarn`.
# livy.server.session.factory = process

# What spark-submit executable path to use to submit spark applications. Defaults to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ object LivyConf {
val SPARK_SUBMIT_KEY = "livy.server.spark-submit"

sealed trait SessionKind
case class Thread() extends SessionKind
case class Process() extends SessionKind
case class Yarn() extends SessionKind
}
Expand Down Expand Up @@ -95,14 +94,13 @@ class LivyConf(loadDefaults: Boolean) {

def sessionKind(): SessionKind = getOption(SESSION_FACTORY_KEY).getOrElse("process") match {
case "process" => Process()
case "thread" => Thread()
case "yarn" => Yarn()
case kind => throw new IllegalStateException(f"unknown kind $kind")
}

/** Return the filesystem root. Defaults to the local filesystem. */
def filesystemRoot(): String = sessionKind() match {
case Process() | Thread() => "file://"
case Process() => "file://"
case Yarn() => "hdfs://"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.slf4j.LoggerFactory
object Main {

val SESSION_KIND = "livy-server.session.kind"
val THREAD_SESSION = "thread"
val PROCESS_SESSION = "process"
val YARN_SESSION = "yarn"
lazy val logger = LoggerFactory.getLogger(this.getClass)
Expand Down Expand Up @@ -136,8 +135,6 @@ class ScalatraBootstrap extends LifeCycle with Logging {
info(f"Using $sessionFactoryKind sessions")

val (sessionFactory, batchFactory) = sessionFactoryKind match {
case LivyConf.Thread() =>
(new InteractiveSessionProcessFactory(livyConf), new BatchSessionProcessFactory(livyConf) )
case LivyConf.Process() =>
(new InteractiveSessionProcessFactory(livyConf), new BatchSessionProcessFactory(livyConf))
case LivyConf.Yarn() =>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 16fa570

Please sign in to comment.