Github user ankurdave commented on a diff in the pull request:
https://github.com/apache/spark/pull/1903#discussion_r17028039
--- Diff:
graphx/src/main/scala/org/apache/spark/graphx/impl/ShippableVertexPartition.scala
---
@@ -36,17 +36,27 @@ private[graphx]
object ShippableVertexPartition {
/** Construct a `ShippableVertexPartition` from the given vertices
without any routing table. */
def apply[VD: ClassTag](iter: Iterator[(VertexId, VD)]):
ShippableVertexPartition[VD] =
- apply(iter, RoutingTablePartition.empty, null.asInstanceOf[VD])
+ apply(iter, RoutingTablePartition.empty, null.asInstanceOf[VD], (a, b)
=> a)
/**
* Construct a `ShippableVertexPartition` from the given vertices with
the specified routing
* table, filling in missing vertices mentioned in the routing table
using `defaultVal`.
*/
def apply[VD: ClassTag](
- iter: Iterator[(VertexId, VD)], routingTable: RoutingTablePartition,
defaultVal: VD)
+ iter: Iterator[(VertexId, VD)], routingTable: RoutingTablePartition,
defaultVal: VD)
+ : ShippableVertexPartition[VD] =
+ apply(iter, routingTable, defaultVal, (a, b) => a)
+
+ /**
+ * Construct a `ShippableVertexPartition` from the given vertices with
the specified routing
+ * table, filling in missing vertices mentioned in the routing table
using `defaultVal`,
+ * and merging duplicate vertex atrribute with mergeFunc.
+ */
+ def apply[VD: ClassTag](
+ iter: Iterator[(VertexId, VD)], routingTable: RoutingTablePartition,
defaultVal: VD, mergeFunc: (VD, VD) => VD)
--- End diff --
Looks like this line is too long - it would be great if you could wrap it.
Also, I think the Spark style is for parameter lists to be indented 4 spaces
instead of 2.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]