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

Drop more elements when stageData.taskData.size > retainedTasks to reduce the number of times on call drop

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • Spark Core
    • None

    Description

      The performance of the drop function is bad.

      • Log the time consuming:
              if (stageData.taskData.size > retainedTasks) {
                val start = System.currentTimeMillis()
                stageData.taskData = stageData.taskData.drop(stageData.taskData.size - retainedTasks)
                logInfo(s"Time consuming: ${System.currentTimeMillis() - start}")
              }
        
      • Time consuming:
        17/01/10 14:04:05 INFO JobProgressListener: Time consuming: 156
        17/01/10 14:04:05 INFO JobProgressListener: Time consuming: 145
        17/01/10 14:04:05 INFO JobProgressListener: Time consuming: 148
        17/01/10 14:04:05 INFO JobProgressListener: Time consuming: 159
        

      My opinion is drop more elements when stageData.taskData.size > retainedTasks to reduce the number of times on call drop.

      Attachments

        Issue Links

          Activity

            People

              yumwang Yuming Wang
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: