Browse Source

[livy] Synchronize the spark interpreter when shutting down

This prevents clients from trying to execute commands while
the interpreter is shutting down.
Erick Tryzelaar 10 năm trước cách đây
mục cha
commit
0e7ac154fe

+ 1 - 1
apps/spark/java/livy-repl/src/main/scala/com/cloudera/hue/livy/repl/scala/interpreter/Interpreter.scala

@@ -123,7 +123,7 @@ class Interpreter {
     result
   }
 
-  def shutdown(): Unit = {
+  def shutdown(): Unit = synchronized {
     _state = Interpreter.ShuttingDown()
 
     if (sparkContext != null) {