Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22873

Init lastReportTimestamp with system current time when start() called in AsyncEventQueue

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Spark Core
    • Labels:
    • Flags:
      Patch

      Description

         if (droppedEventsCounter.compareAndSet(droppedCount, 0)) {
            val prevLastReportTimestamp = lastReportTimestamp
            lastReportTimestamp = System.currentTimeMillis()
            val previous = new java.util.Date(prevLastReportTimestamp)
            logWarning(s"Dropped $droppedEvents events from $name since $previous.")
         }
      

      First time we log previous date, it would be "Thu Jan 01 08:00:00 CST 1970" because of lastReportTimestamp was inited by 0L. Although there is no mistake in theory, AsyncEventQueue's starting time seems better.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Ngone51 wuyi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: