-
- Downloads
[SPARK-19594][STRUCTURED STREAMING] StreamingQueryListener fails to handle...
[SPARK-19594][STRUCTURED STREAMING] StreamingQueryListener fails to handle QueryTerminatedEvent if more then one listeners exists ## What changes were proposed in this pull request? currently if multiple streaming queries listeners exists, when a QueryTerminatedEvent is triggered, only one of the listeners will be invoked while the rest of the listeners will ignore the event. this is caused since the the streaming queries listeners bus holds a set of running queries ids and when a termination event is triggered, after the first listeners is handling the event, the terminated query id is being removed from the set. in this PR, the query id will be removed from the set only after all the listeners handles the event ## How was this patch tested? a test with multiple listeners has been added to StreamingQueryListenerSuite Author: Eyal Zituny <eyal.zituny@equalum.io> Closes #16991 from eyalzit/master.
Showing
- core/src/main/scala/org/apache/spark/util/ListenerBus.scala 1 addition, 1 deletioncore/src/main/scala/org/apache/spark/util/ListenerBus.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingQueryListenerBus.scala 13 additions, 1 deletion...k/sql/execution/streaming/StreamingQueryListenerBus.scala
- sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenerSuite.scala 25 additions, 0 deletions...che/spark/sql/streaming/StreamingQueryListenerSuite.scala
Please register or sign in to comment