aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/org/apache/spark/SparkContext.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/org/apache/spark/SparkContext.scala')
-rw-r--r--core/src/main/scala/org/apache/spark/SparkContext.scala16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala b/core/src/main/scala/org/apache/spark/SparkContext.scala
index 33b11ed2e6..230fabd211 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -1340,21 +1340,21 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
}
/**
- * Create and register a list accumulator, which starts with empty list and accumulates inputs
- * by adding them into the inner list.
+ * Create and register a [[CollectionAccumulator]], which starts with empty list and accumulates
+ * inputs by adding them into the list.
*/
- def listAccumulator[T]: ListAccumulator[T] = {
- val acc = new ListAccumulator[T]
+ def collectionAccumulator[T]: CollectionAccumulator[T] = {
+ val acc = new CollectionAccumulator[T]
register(acc)
acc
}
/**
- * Create and register a list accumulator, which starts with empty list and accumulates inputs
- * by adding them into the inner list.
+ * Create and register a [[CollectionAccumulator]], which starts with empty list and accumulates
+ * inputs by adding them into the list.
*/
- def listAccumulator[T](name: String): ListAccumulator[T] = {
- val acc = new ListAccumulator[T]
+ def collectionAccumulator[T](name: String): CollectionAccumulator[T] = {
+ val acc = new CollectionAccumulator[T]
register(acc, name)
acc
}