Skip to content
Snippets Groups Projects
Commit 79b20e4d authored by Reynold Xin's avatar Reynold Xin
Browse files

Merge pull request #310 from jyunfan/master

Fix typo in the Accumulators section

Change 'val' to 'var'
parents 7375047d 17f6620a
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
The interpreter session below shows an accumulator being used to add up the elements of an array:
{% highlight scala %}
scala> val accum = sc.accumulator(0)
scala> var accum = sc.accumulator(0)
accum: spark.Accumulator[Int] = 0
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