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

    https://github.com/apache/spark/pull/1309#discussion_r14695670
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -809,12 +810,24 @@ 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)
    +            val name = acc.name
    +            // To avoid UI cruft, ignore cases where value wasn't updated
    +            if (partialValue != acc.zero) {
    +              val stringPartialValue = s"${partialValue}"
    +              val stringValue = s"${acc.value}"
    +              stageToInfos(stage).accumulatedValues(name) = stringValue
    --- End diff --
    
    Can you add a comment here saying that you update it incrementally (and not 
just at the end) so the UI always shows the correct value (assuming that is the 
reason)?


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

Reply via email to