Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/15220#discussion_r80319523
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/LiveListenerBus.scala ---
@@ -123,6 +129,23 @@ private[spark] class LiveListenerBus(val sparkContext:
SparkContext) extends Spa
eventLock.release()
} else {
onDropEvent(event)
+ droppedEventsCounter.incrementAndGet()
+ }
+ // Don't log too frequently
+ if (System.currentTimeMillis() - lastReportTimestamp >= 60 * 1000) {
+ var droppedEvents = droppedEventsCounter.get
+ while (droppedEvents > 0) {
+ // There may be multiple threads trying to decrease
droppedEventsCounter.
+ // Use "compareAndSet" to make sure only one thread can win.
+ // And if another thread is increasing droppedEventsCounter,
"compareAndSet" will fail
+ // and we will try again.
+ if (droppedEventsCounter.compareAndSet(droppedEvents, 0)) {
+ lastReportTimestamp = System.currentTimeMillis()
+ logWarning(s"Dropped $droppedEvents SparkListenerEvents")
--- End diff --
Should we also log the lastReportTimestamp?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]