Repository: spark Updated Branches: refs/heads/master 987f38658 -> f704ebe90
[SPARK-25683][CORE] Updated the log for the firstTime event Drop occurs ## What changes were proposed in this pull request? When the first dropEvent occurs, LastReportTimestamp was printing in the log as Wed Dec 31 16:00:00 PST 1969 (Dropped 1 events from eventLog since Wed Dec 31 16:00:00 PST 1969.) The reason is that lastReportTimestamp initialized with 0. Now log is updated to print "... since the application starts" if 'lastReportTimestamp' == 0. this will happens first dropEvent occurs. ## How was this patch tested? Manually verified. Closes #22677 from shivusondur/AsyncEvent1. Authored-by: shivusondur <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/f704ebe9 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/f704ebe9 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/f704ebe9 Branch: refs/heads/master Commit: f704ebe9026ac065416d50adcb9c807c7c7a4102 Parents: 987f386 Author: shivusondur <[email protected]> Authored: Thu Oct 18 15:05:56 2018 -0700 Committer: Marcelo Vanzin <[email protected]> Committed: Thu Oct 18 15:05:56 2018 -0700 ---------------------------------------------------------------------- .../main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/f704ebe9/core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala b/core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala index e2b6df4..7cd2b86 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala @@ -169,7 +169,8 @@ private class AsyncEventQueue( val prevLastReportTimestamp = lastReportTimestamp lastReportTimestamp = System.currentTimeMillis() val previous = new java.util.Date(prevLastReportTimestamp) - logWarning(s"Dropped $droppedCount events from $name since $previous.") + logWarning(s"Dropped $droppedCount events from $name since " + + s"${if (prevLastReportTimestamp == 0) "the application started" else s"$previous"}.") } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
