dongjoon-hyun 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_r344470169
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/ListenerBus.scala
 ##########
 @@ -104,14 +120,17 @@ private[spark] trait ListenerBus[L <: AnyRef, E] extends 
Logging {
         }
       } catch {
         case ie: InterruptedException =>
-          logError(s"Interrupted while posting to 
${Utils.getFormattedClassName(listener)}.  " +
-            s"Removing that listener.", ie)
+          logError(s"Interrupted while posting to ${listenerName}. Removing 
that listener.", ie)
           removeListenerOnError(listener)
         case NonFatal(e) if !isIgnorableException(e) =>
-          logError(s"Listener ${Utils.getFormattedClassName(listener)} threw 
an exception", e)
+          logError(s"Listener ${listenerName} threw an exception", e)
       } finally {
         if (maybeTimerContext != null) {
-          maybeTimerContext.stop()
+          val elapsed = maybeTimerContext.stop()
+          if (logSlowEventEnabled && elapsed > logSlowEventThreshold) {
+            logError(s"Process of event ${event} by listener ${listenerName} 
took " +
 
 Review comment:
   `logInfo`? This is not an error semantically and `ERROR` is monitored 
seriously from users.

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