diff options
author | hyukjinkwon <gurwls223@gmail.com> | 2016-08-12 10:00:58 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-08-12 10:00:58 +0100 |
commit | f4482225c405b9cfe078deac74e4c28e2dcc97c3 (patch) | |
tree | eacdde1d4a2cab3177e63029a7f532c498a34454 /docs/graphx-programming-guide.md | |
parent | 993923c8f5ca719daf905285738b7fdcaf944d8c (diff) | |
download | spark-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/graphx-programming-guide.md')
-rw-r--r-- | docs/graphx-programming-guide.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/graphx-programming-guide.md b/docs/graphx-programming-guide.md index bf4b968eb8..6f738f0599 100644 --- a/docs/graphx-programming-guide.md +++ b/docs/graphx-programming-guide.md @@ -421,15 +421,15 @@ val graph = Graph(users, relationships, defaultUser) // Notice that there is a user 0 (for which we have no information) connected to users // 4 (peter) and 5 (franklin). graph.triplets.map( - triplet => triplet.srcAttr._1 + " is the " + triplet.attr + " of " + triplet.dstAttr._1 - ).collect.foreach(println(_)) + triplet => triplet.srcAttr._1 + " is the " + triplet.attr + " of " + triplet.dstAttr._1 +).collect.foreach(println(_)) // Remove missing vertices as well as the edges to connected to them val validGraph = graph.subgraph(vpred = (id, attr) => attr._2 != "Missing") // The valid subgraph will disconnect users 4 and 5 by removing user 0 validGraph.vertices.collect.foreach(println(_)) validGraph.triplets.map( - triplet => triplet.srcAttr._1 + " is the " + triplet.attr + " of " + triplet.dstAttr._1 - ).collect.foreach(println(_)) + triplet => triplet.srcAttr._1 + " is the " + triplet.attr + " of " + triplet.dstAttr._1 +).collect.foreach(println(_)) {% endhighlight %} > Note in the above example only the vertex predicate is provided. The `subgraph` operator defaults |