aboutsummaryrefslogtreecommitdiff
path: root/docs/programming-guide.md
diff options
context:
space:
mode:
authorhyukjinkwon <gurwls223@gmail.com>2016-08-12 10:00:58 +0100
committerSean Owen <sowen@cloudera.com>2016-08-12 10:00:58 +0100
commitf4482225c405b9cfe078deac74e4c28e2dcc97c3 (patch)
treeeacdde1d4a2cab3177e63029a7f532c498a34454 /docs/programming-guide.md
parent993923c8f5ca719daf905285738b7fdcaf944d8c (diff)
downloadspark-f4482225c405b9cfe078deac74e4c28e2dcc97c3.tar.gz
spark-f4482225c405b9cfe078deac74e4c28e2dcc97c3.tar.bz2
spark-f4482225c405b9cfe078deac74e4c28e2dcc97c3.zip
[MINOR][DOC] Fix style in examples across documentation
## What changes were proposed in this pull request? This PR fixes the documentation as below: - Python has 4 spaces and Java and Scala has 2 spaces (See https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide). - Avoid excessive parentheses and curly braces for anonymous functions. (See https://github.com/databricks/scala-style-guide#anonymous) ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closes #14593 from HyukjinKwon/minor-documentation.
Diffstat (limited to 'docs/programming-guide.md')
-rw-r--r--docs/programming-guide.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/programming-guide.md b/docs/programming-guide.md
index f82832905e..40287d7702 100644
--- a/docs/programming-guide.md
+++ b/docs/programming-guide.md
@@ -1516,8 +1516,8 @@ data.map(x -> { accum.add(x); return f(x); });
{% highlight python %}
accum = sc.accumulator(0)
def g(x):
- accum.add(x)
- return f(x)
+ accum.add(x)
+ return f(x)
data.map(g)
# Here, accum is still 0 because no actions have caused the `map` to be computed.
{% endhighlight %}