You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/18 13:40:24 UTC

[GitHub] [spark] srowen commented on a change in pull request #24400: [SPARK-27503][DStream] JobGenerator thread exit for some fatal errors but application keeps running

srowen commented on a change in pull request #24400: [SPARK-27503][DStream] JobGenerator thread exit for some fatal errors but application keeps running
URL: https://github.com/apache/spark/pull/24400#discussion_r276667324
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/EventLoop.scala
 ##########
 @@ -100,7 +100,11 @@ private[spark] abstract class EventLoop[E](name: String) extends Logging {
    * Put the event into the event queue. The event thread will process it later.
    */
   def post(event: E): Unit = {
-    eventQueue.put(event)
+    if (eventThread.isAlive && !stopped.get) {
+      eventQueue.put(event)
+    } else {
+      onError(new IllegalStateException(s"$name has already been stopped."))
+    }
 
 Review comment:
   What about just ignoring the post? does it need to throw an error here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org