jiangxb1987 commented on a change in pull request #25702: [SPARK-29001][CORE] 
Print events that take too long time to process
URL: https://github.com/apache/spark/pull/25702#discussion_r344399759
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/ListenerBus.scala
 ##########
 @@ -111,7 +118,10 @@ private[spark] trait ListenerBus[L <: AnyRef, E] extends 
Logging {
           logError(s"Listener ${Utils.getFormattedClassName(listener)} threw 
an exception", e)
       } finally {
         if (maybeTimerContext != null) {
-          maybeTimerContext.stop()
+          val elapsed = maybeTimerContext.stop()
+          if (logSlowEventEnabled && elapsed > logSlowEventThreshold) {
+            logError(s"Process of event ${event} took ${elapsed / 
1000000000d}s.")
 
 Review comment:
   updated

----------------------------------------------------------------
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]

Reply via email to