Github user markhamstra commented on a diff in the pull request: https://github.com/apache/spark/pull/1309#discussion_r15557746 --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala --- @@ -809,12 +810,25 @@ class DAGScheduler( listenerBus.post(SparkListenerStageCompleted(stageToInfos(stage))) runningStages -= stage } + event.reason match { case Success => logInfo("Completed " + task) if (event.accumUpdates != null) { // TODO: fail the stage if the accumulator update fails... Accumulators.add(event.accumUpdates) // TODO: do this only if task wasn't resubmitted + event.accumUpdates.foreach { case (id, partialValue) => + val acc = Accumulators.originals(id).asInstanceOf[Accumulable[Any, Any]] + 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) + stageToInfos(stage).accumulables(id) = AccumulableInfo(id, acc.name, stringValue) + event.taskInfo.accumulables += + AccumulableInfo(id, name, Some(stringPartialValue), stringValue) + } + } --- End diff -- Can this be moved to a method on the Accumulators companion object or something? These details about AccumulableInfo, prettyPartialValues, etc. aren't things that need to appear in the DAGScheduler.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---