Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/7774#discussion_r36116764
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -1239,6 +1239,21 @@ class SparkContext(config: SparkConf) extends
Logging with ExecutorAllocationCli
}
/**
+ * Create an [[org.apache.spark.Accumulator]] variable of a given type,
with a name for display
+ * in the Spark UI. Tasks can "add" values to the accumulator using the
`+=` method. Only the
+ * driver can access the accumulator's `value`. The latest local value
of such accumulator will be
+ * sent back to the driver via heartbeats.
+ *
+ * @tparam T type that can be added to the accumulator, must be thread
safe
+ */
+ private[spark] def internalAccumulator[T](initialValue: T, name: String)(
+ implicit param: AccumulatorParam[T]): Accumulator[T] = {
+ val acc = new Accumulator(initialValue, param, Some(name), true)
--- End diff --
`internal = true`
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]