Github user wickedshimmy commented on a diff in the pull request:
https://github.com/apache/spark/pull/1217#discussion_r15646928
--- Diff: graphx/src/main/scala/org/apache/spark/graphx/Pregel.scala ---
@@ -22,12 +22,58 @@ import org.apache.spark.Logging
/**
- * Implements a Pregel-like bulk-synchronous message-passing API.
+ * The Pregel Vertex class contains the vertex attribute and the boolean
flag
+ * indicating whether the vertex is active.
*
- * Unlike the original Pregel API, the GraphX Pregel API factors the
sendMessage computation over
- * edges, enables the message sending computation to read both vertex
attributes, and constrains
- * messages to the graph structure. These changes allow for substantially
more efficient
- * distributed execution while also exposing greater flexibility for
graph-based computation.
+ * @param attr the vertex prorperty during the pregel computation (e.g.,
+ * PageRank)
+ * @param isActive a flag indicating whether the vertex is active
+ * @tparam T the type of the vertex property
+ */
+sealed case class PregelVertex[@specialized T]
+ (attr: T, isActive: Boolean = true) extends Product2[T, Boolean] {
+ override def _1: T = attr
+ override def _2: Boolean = isActive
+}
+
+
+/**
+ * The Pregel API enables users to express iterative graph algorithms in
GraphX
+ * and is loosely based on the Google and GraphLab APIs.
+ *
+ * At a high-level iterative graph algorithms like PageRank recursively
define
+ * vertex properties in terms of the properties of neighboring vertices.
These
+ * recursive properties are then computed through iterative fixed-point
+ * computations. For example, the PageRank of a web-page can be defined
as a
+ * weighted some of the PageRank of web-pages that link to that page and is
--- End diff --
"weighted sum" :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---