diff options
author | Ankur Dave <ankurdave@gmail.com> | 2014-01-12 13:10:53 -0800 |
---|---|---|
committer | Ankur Dave <ankurdave@gmail.com> | 2014-01-12 13:10:53 -0800 |
commit | 5e35d39e0f26db3b669bc2318bd7b3f9f6c5fc50 (patch) | |
tree | 78095f94c96743bca07ce225f237c93628894620 /graphx | |
parent | f096f4eaf1f8e936eafc2006ecd01faa2f208cf2 (diff) | |
download | spark-5e35d39e0f26db3b669bc2318bd7b3f9f6c5fc50.tar.gz spark-5e35d39e0f26db3b669bc2318bd7b3f9f6c5fc50.tar.bz2 spark-5e35d39e0f26db3b669bc2318bd7b3f9f6c5fc50.zip |
Add PageRank example and data
Diffstat (limited to 'graphx')
-rw-r--r-- | graphx/data/followers.txt | 12 | ||||
-rw-r--r-- | graphx/data/users.txt | 6 | ||||
-rw-r--r-- | graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/graphx/data/followers.txt b/graphx/data/followers.txt new file mode 100644 index 0000000000..0f46d80806 --- /dev/null +++ b/graphx/data/followers.txt @@ -0,0 +1,12 @@ +2 1 +3 1 +4 1 +6 1 +3 2 +6 2 +7 2 +6 3 +7 3 +7 6 +6 7 +3 7 diff --git a/graphx/data/users.txt b/graphx/data/users.txt new file mode 100644 index 0000000000..ce3d06c600 --- /dev/null +++ b/graphx/data/users.txt @@ -0,0 +1,6 @@ +1 BarackObama +2 ericschmidt +3 jeresig +4 justinbieber +6 matei_zaharia +7 odersky diff --git a/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala b/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala index 809b6d0855..cf95267e77 100644 --- a/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala +++ b/graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala @@ -106,7 +106,7 @@ object PageRank extends Logging { * @tparam ED the original edge attribute (not used) * * @param graph the graph on which to compute PageRank - * @param tol the tolerance allowed at convergence (smaller => more * accurate). + * @param tol the tolerance allowed at convergence (smaller => more accurate). * @param resetProb the random reset probability (alpha) * * @return the graph containing with each vertex containing the PageRank and each edge |