Эх сурвалжийг харах

[livy] Add Session.stop()

Erick Tryzelaar 10 жил өмнө
parent
commit
745ae8524a

+ 4 - 0
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/Session.scala

@@ -20,8 +20,12 @@ package com.cloudera.hue.livy.server
 
 import com.cloudera.hue.livy.sessions.State
 
+import scala.concurrent.Future
+
 trait Session {
   def id: Int
 
   def state: State
+
+  def stop(): Future[Unit]
 }

+ 0 - 3
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSession.scala

@@ -20,10 +20,7 @@ package com.cloudera.hue.livy.server.batch
 
 import com.cloudera.hue.livy.server.Session
 
-import scala.concurrent.Future
-
 trait BatchSession extends Session {
   def lines: IndexedSeq[String]
 
-  def stop(): Future[Unit]
 }

+ 0 - 2
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/interactive/InteractiveSession.scala

@@ -52,8 +52,6 @@ trait InteractiveSession extends Session {
 
   def interrupt(): Future[Unit]
 
-  def stop(): Future[Unit]
-
   @throws(classOf[TimeoutException])
   @throws(classOf[InterruptedException])
   final def waitForStateChange(oldState: State, atMost: Duration) = {