Skip to content

Commit

Permalink
Stash
Browse files Browse the repository at this point in the history
  • Loading branch information
pwendell committed Aug 2, 2014
1 parent be97261 commit e95bf69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions core/src/main/scala/org/apache/spark/Accumulators.scala
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ class Accumulable[R, T] (
}
}

/**
* Function to customize printing values of this accumulator.
*/
def prettyValue(_value: R) = s"$value"

/**
* Function to customize printing partially accumulated (local) values of this accumulator.
*/
def prettyPartialValue(_value: R) = prettyValue(_value)

/**
* Get the current value of this accumulator from within a task.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,8 @@ class DAGScheduler(
val name = acc.name
// To avoid UI cruft, ignore cases where value wasn't updated
if (partialValue != acc.zero) {
val stringPartialValue = acc.prettyPartialValue(partialValue)
val stringValue = acc.prettyValue(acc.value)
val stringPartialValue = "%s".format(partialValue)
val stringValue = "%s".format(acc.value)
stageToInfos(stage).accumulables(id) = AccumulableInfo(id, acc.name, stringValue)
event.taskInfo.accumulables +=
AccumulableInfo(id, name, Some(stringPartialValue), stringValue)
Expand Down

0 comments on commit e95bf69

Please sign in to comment.