Skip to content
Snippets Groups Projects
Commit 17f6620a authored by Jyun-Fan Tsai's avatar Jyun-Fan Tsai
Browse files

Fix typo in the Accumulators section

val => var
parent 7375047d
No related branches found
No related tags found
No related merge requests found
...@@ -349,7 +349,7 @@ An accumulator is created from an initial value `v` by calling `SparkContext.acc ...@@ -349,7 +349,7 @@ An accumulator is created from an initial value `v` by calling `SparkContext.acc
The interpreter session below shows an accumulator being used to add up the elements of an array: The interpreter session below shows an accumulator being used to add up the elements of an array:
{% highlight scala %} {% highlight scala %}
scala> val accum = sc.accumulator(0) scala> var accum = sc.accumulator(0)
accum: spark.Accumulator[Int] = 0 accum: spark.Accumulator[Int] = 0
scala> sc.parallelize(Array(1, 2, 3, 4)).foreach(x => accum += x) scala> sc.parallelize(Array(1, 2, 3, 4)).foreach(x => accum += x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment