Skip to content

Commit

Permalink
Fix test failures and mark a couple variables private
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza committed Aug 6, 2014
1 parent c5e68e5 commit 8be6218
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private[spark] class HashShuffleWriter[K, V](
// we don't try deleting files, etc twice.
private var stopping = false

val writeMetrics = new ShuffleWriteMetrics()
private val writeMetrics = new ShuffleWriteMetrics()
metrics.shuffleWriteMetrics = Some(writeMetrics)

private val blockManager = SparkEnv.get.blockManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private[spark] class SortShuffleWriter[K, V, C](

private var mapStatus: MapStatus = null

val writeMetrics = new ShuffleWriteMetrics()
private val writeMetrics = new ShuffleWriteMetrics()
context.taskMetrics.shuffleWriteMetrics = Some(writeMetrics)

/** Write a bunch of records to this task's output */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private[spark] class DiskBlockObjectWriter(
}

override def fileSegment(): FileSegment = {
new FileSegment(file, initialPosition, writeMetrics.shuffleBytesWritten)
new FileSegment(file, initialPosition, finalPosition - initialPosition)
}

private def updateBytesWritten() {
Expand Down

0 comments on commit 8be6218

Please sign in to comment.