Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/1309#discussion_r14696305
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -758,6 +758,16 @@ class SparkContext(config: SparkConf) extends Logging {
new Accumulator(initialValue, param)
/**
+ * Create an [[org.apache.spark.Accumulator]] variable of a given type,
which tasks can "add"
+ * values to using the `+=` method. Only the driver can access the
accumulator's `value`.
+ *
+ * This version adds a custom name to the accumulator for display in the
Spark UI.
+ */
+ def accumulator[T](initialValue: T, name: String)(implicit param:
AccumulatorParam[T]) = {
+ new Accumulator(initialValue, param, name, true)
+ }
+
+ /**
--- End diff --
Should there be (maybe you were planning to add it later since I know this
is still WIP) a similar new accumulable method?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---