You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/15 08:17:12 UTC
[3/3] git commit: Merge pull request #436 from ankurdave/VertexId-case
Merge pull request #436 from ankurdave/VertexId-case
Rename VertexID -> VertexId in GraphX
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/3d9e66d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/3d9e66d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/3d9e66d9
Branch: refs/heads/master
Commit: 3d9e66d92ada4fa93dd0bd78cb4c80f8169e6393
Parents: 139c24e f4d9019
Author: Reynold Xin <rx...@apache.org>
Authored: Tue Jan 14 23:17:05 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Tue Jan 14 23:17:05 2014 -0800
----------------------------------------------------------------------
docs/graphx-programming-guide.md | 70 ++++++++++----------
.../scala/org/apache/spark/graphx/Edge.scala | 8 +--
.../scala/org/apache/spark/graphx/EdgeRDD.scala | 4 +-
.../org/apache/spark/graphx/EdgeTriplet.scala | 4 +-
.../scala/org/apache/spark/graphx/Graph.scala | 18 ++---
.../spark/graphx/GraphKryoRegistrator.scala | 2 +-
.../org/apache/spark/graphx/GraphOps.scala | 32 ++++-----
.../apache/spark/graphx/PartitionStrategy.scala | 14 ++--
.../scala/org/apache/spark/graphx/Pregel.scala | 8 +--
.../org/apache/spark/graphx/VertexRDD.scala | 42 ++++++------
.../spark/graphx/impl/EdgePartition.scala | 16 ++---
.../graphx/impl/EdgePartitionBuilder.scala | 10 +--
.../spark/graphx/impl/EdgeTripletIterator.scala | 2 +-
.../apache/spark/graphx/impl/GraphImpl.scala | 32 ++++-----
.../spark/graphx/impl/MessageToPartition.scala | 12 ++--
.../graphx/impl/ReplicatedVertexView.scala | 30 ++++-----
.../apache/spark/graphx/impl/RoutingTable.scala | 16 ++---
.../apache/spark/graphx/impl/Serializers.scala | 10 +--
.../spark/graphx/impl/VertexPartition.scala | 44 ++++++------
.../org/apache/spark/graphx/impl/package.scala | 2 +-
.../spark/graphx/lib/ConnectedComponents.scala | 4 +-
.../org/apache/spark/graphx/lib/PageRank.scala | 4 +-
.../apache/spark/graphx/lib/SVDPlusPlus.scala | 12 ++--
.../lib/StronglyConnectedComponents.scala | 6 +-
.../apache/spark/graphx/lib/TriangleCount.scala | 2 +-
.../scala/org/apache/spark/graphx/package.scala | 4 +-
.../spark/graphx/util/GraphGenerators.scala | 12 ++--
.../org/apache/spark/graphx/GraphOpsSuite.scala | 10 +--
.../org/apache/spark/graphx/GraphSuite.scala | 28 ++++----
.../org/apache/spark/graphx/PregelSuite.scala | 8 +--
.../apache/spark/graphx/SerializerSuite.scala | 18 ++---
.../spark/graphx/impl/EdgePartitionSuite.scala | 2 +-
.../graphx/lib/ConnectedComponentsSuite.scala | 2 +-
33 files changed, 244 insertions(+), 244 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/3d9e66d9/docs/graphx-programming-guide.md
----------------------------------------------------------------------
diff --cc docs/graphx-programming-guide.md
index 4bf4743,375bf20..3dfed7b
--- a/docs/graphx-programming-guide.md
+++ b/docs/graphx-programming-guide.md
@@@ -857,21 -788,21 +857,21 @@@ respectively. In this section we revie
## VertexRDDs
-The `VertexRDD[A]` extends the more traditional `RDD[(VertexId, A)]` but adds the additional
-constraint that each `VertexId` occurs only *once*. Moreover, `VertexRDD[A]` represents a *set* of
-vertices each with an attribute of type `A`. Internally, this is achieved by storing the vertex
-attributes in a reusable hash-map data-structure. As a consequence if two `VertexRDD`s are derived
-from the same base `VertexRDD` (e.g., by `filter` or `mapValues`) they can be joined in constant
-time without hash evaluations. To leverage this indexed data-structure, the `VertexRDD` exposes the
-following additional functionality:
+The `VertexRDD[A]` extends `RDD[(VertexID, A)]` and adds the additional constraint that each
+`VertexID` occurs only *once*. Moreover, `VertexRDD[A]` represents a *set* of vertices each with an
+attribute of type `A`. Internally, this is achieved by storing the vertex attributes in a reusable
+hash-map data-structure. As a consequence if two `VertexRDD`s are derived from the same base
+`VertexRDD` (e.g., by `filter` or `mapValues`) they can be joined in constant time without hash
+evaluations. To leverage this indexed data-structure, the `VertexRDD` exposes the following
+additional functionality:
{% highlight scala %}
-class VertexRDD[VD] {
+class VertexRDD[VD] extends RDD[(VertexID, VD)] {
// Filter the vertex set but preserves the internal index
- def filter(pred: Tuple2[VertexID, VD] => Boolean): VertexRDD[VD]
+ def filter(pred: Tuple2[VertexId, VD] => Boolean): VertexRDD[VD]
// Transform the values without changing the ids (preserves the internal index)
def mapValues[VD2](map: VD => VD2): VertexRDD[VD2]
- def mapValues[VD2](map: (VertexID, VD) => VD2): VertexRDD[VD2]
+ def mapValues[VD2](map: (VertexId, VD) => VD2): VertexRDD[VD2]
// Remove vertices from this set that appear in the other set
def diff(other: VertexRDD[VD]): VertexRDD[VD]
// Join operators that take advantage of the internal indexing to accelerate joins (substantially)