seanli-rallyhealth commented on a change in pull request #27002: 
[SPARK-30346]Improve logging when events dropped
URL: https://github.com/apache/spark/pull/27002#discussion_r361223967
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala
 ##########
 @@ -67,8 +67,11 @@ private class AsyncEventQueue(
   /** A counter for dropped events. It will be reset every time we log it. */
   private val droppedEventsCounter = new AtomicLong(0L)
 
+  /** A counter to keep dropped events count last time it was logged */
+  private var lastDroppedEventsCounter: Long = 0L
+
   /** When `droppedEventsCounter` was logged last time in milliseconds. */
-  @volatile private var lastReportTimestamp = 0L
+  @volatile private var lastReportTimestamp = new AtomicLong(0L)
 
 Review comment:
   no need to be var, use val set()

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to