From b6399d2c79fd7a365ab3e3bca4814272d5df6614 Mon Sep 17 00:00:00 2001 From: Shivansh Date: Thu, 4 Aug 2016 18:11:58 +0530 Subject: [PATCH] [#SPARK-16897] Refactored the code and changed the var to val --- docs/programming-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/programming-guide.md b/docs/programming-guide.md index 888c12f18635c..dc4d4851515d6 100644 --- a/docs/programming-guide.md +++ b/docs/programming-guide.md @@ -764,7 +764,7 @@ Consider the naive RDD element sum below, which may behave differently depending
{% highlight scala %} var counter = 0 -var rdd = sc.parallelize(data) +val rdd = sc.parallelize(data) // Wrong: Don't do this!! rdd.foreach(x => counter += x)