You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2015/07/30 19:14:01 UTC

spark git commit: [SPARK-9267] [CORE] Retire stringify(Partial)?Value from Accumulators

Repository: spark
Updated Branches:
  refs/heads/master c0cc0eaec -> 7bbf02f0b


[SPARK-9267] [CORE] Retire stringify(Partial)?Value from Accumulators

cc srowen

Author: François Garillot <fr...@garillot.net>

Closes #7678 from huitseeker/master and squashes the following commits:

5e99f57 [François Garillot] [SPARK-9267][Core] Retire stringify(Partial)?Value from Accumulators


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7bbf02f0
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7bbf02f0
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7bbf02f0

Branch: refs/heads/master
Commit: 7bbf02f0bddefd19985372af79e906a38bc528b6
Parents: c0cc0ea
Author: François Garillot <fr...@garillot.net>
Authored: Thu Jul 30 18:14:08 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Thu Jul 30 18:14:08 2015 +0100

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/Accumulators.scala        | 3 ---
 .../main/scala/org/apache/spark/scheduler/DAGScheduler.scala   | 6 ++----
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7bbf02f0/core/src/main/scala/org/apache/spark/Accumulators.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/Accumulators.scala b/core/src/main/scala/org/apache/spark/Accumulators.scala
index 2f4fcac..eb75f26 100644
--- a/core/src/main/scala/org/apache/spark/Accumulators.scala
+++ b/core/src/main/scala/org/apache/spark/Accumulators.scala
@@ -341,7 +341,4 @@ private[spark] object Accumulators extends Logging {
     }
   }
 
-  def stringifyPartialValue(partialValue: Any): String = "%s".format(partialValue)
-
-  def stringifyValue(value: Any): String = "%s".format(value)
 }

http://git-wip-us.apache.org/repos/asf/spark/blob/7bbf02f0/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
index cdf6078..c4fa277 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
@@ -916,11 +916,9 @@ class DAGScheduler(
           // To avoid UI cruft, ignore cases where value wasn't updated
           if (acc.name.isDefined && partialValue != acc.zero) {
             val name = acc.name.get
-            val stringPartialValue = Accumulators.stringifyPartialValue(partialValue)
-            val stringValue = Accumulators.stringifyValue(acc.value)
-            stage.latestInfo.accumulables(id) = AccumulableInfo(id, name, stringValue)
+            stage.latestInfo.accumulables(id) = AccumulableInfo(id, name, s"${acc.value}")
             event.taskInfo.accumulables +=
-              AccumulableInfo(id, name, Some(stringPartialValue), stringValue)
+              AccumulableInfo(id, name, Some(s"$partialValue"), s"${acc.value}")
           }
         }
       } catch {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org