def apply(s: String): SessionState = s match { case "not_started" => NotStarted case "starting" => Starting case "recovering" => Recovering case "idle" => Idle case "running" => Running case "busy" => Busy case "shutting_down" => ShuttingDown case "error" => Error() case "dead" => Dead() case "killed" => Killed() case "success" => Success() case _ => throw new IllegalArgumentException(s"Illegal session state: $s") }
// How long to check livy session leakage val YARN_APP_LEAKAGE_CHECK_TIMEOUT = Entry("livy.server.yarn.app-leakage.check-timeout", "600s") // how often to check livy session leakage val YARN_APP_LEAKAGE_CHECK_INTERVAL = Entry("livy.server.yarn.app-leakage.check-interval", "60s")
// Whether session timeout should be checked, by default it will be checked, which means inactive // session will be stopped after "livy.server.session.timeout" val SESSION_TIMEOUT_CHECK = Entry("livy.server.session.timeout-check", true)
// Whether session timeout check should skip busy sessions, if set to true, then busy sessions // that have jobs running will never timeout. val SESSION_TIMEOUT_CHECK_SKIP_BUSY = Entry("livy.server.session.timeout-check.skip-busy", false)
// How long will an inactive session be gc-ed. val SESSION_TIMEOUT = Entry("livy.server.session.timeout", "1h")
// How long a finished session state will be kept in memory val SESSION_STATE_RETAIN_TIME = Entry("livy.server.session.state-retain.sec", "600s")
// Max creating session in livyServer val SESSION_MAX_CREATION = Entry("livy.server.session.max-creation", 100)