Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6397#discussion_r30989676
  
    --- Diff: 
core/src/main/scala/org/apache/spark/util/collection/ExternalSorter.scala ---
    @@ -778,41 +692,15 @@ private[spark] class ExternalSorter[K, V, C](
     
         context.taskMetrics.incMemoryBytesSpilled(memoryBytesSpilled)
         context.taskMetrics.incDiskBytesSpilled(diskBytesSpilled)
    -    context.taskMetrics.shuffleWriteMetrics.filter(_ => 
bypassMergeSort).foreach { m =>
    -      if (curWriteMetrics != null) {
    -        m.incShuffleBytesWritten(curWriteMetrics.shuffleBytesWritten)
    -        m.incShuffleWriteTime(curWriteMetrics.shuffleWriteTime)
    -        m.incShuffleRecordsWritten(curWriteMetrics.shuffleRecordsWritten)
    -      }
    -    }
     
         lengths
       }
     
    -  /**
    -   * Read a partition file back as an iterator (used in our iterator 
method)
    -   */
    -  private def readPartitionFile(writer: BlockObjectWriter): 
Iterator[Product2[K, C]] = {
    -    if (writer.isOpen) {
    -      writer.commitAndClose()
    -    }
    -    new PairIterator[K, 
C](blockManager.diskStore.getValues(writer.blockId, ser).get)
    -  }
    -
       def stop(): Unit = {
         spills.foreach(s => s.file.delete())
         spills.clear()
    -    if (partitionWriters != null) {
    -      partitionWriters.foreach { w =>
    -        w.revertPartialWritesAndClose()
    -        diskBlockManager.getFile(w.blockId).delete()
    -      }
    -      partitionWriters = null
    -    }
       }
     
    -  def diskBytesSpilled: Long = _diskBytesSpilled
    --- End diff --
    
    I moved this up to the top of the file so that it's next to where 
`_diskBytesSpilled` is defined.


---
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]

Reply via email to