Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/1309#discussion_r14695474
--- 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.
--- End diff --
It would be nice to have a short code example here (or somewhere in the
documentation) showing how you can create of these and use it
---
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.
---