uncleGen 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_r276565965
##########
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:
here we only need to report thread stopped. There is no exception messages,
but it is fine because thread will throw exception when exit.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]