Skip to content

Commit

Permalink
Fix style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurdave committed Apr 23, 2014
1 parent e4fbd32 commit ae36110
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ object VertexRDD {
* @param numPartitions the desired number of partitions for the resulting `VertexRDD`
* @param defaultVal the vertex attribute to use when creating missing vertices
*/
def fromEdges[VD: ClassTag](edges: EdgeRDD[_, _], numPartitions: Int, defaultVal: VD): VertexRDD[VD] = {
def fromEdges[VD: ClassTag](
edges: EdgeRDD[_, _], numPartitions: Int, defaultVal: VD): VertexRDD[VD] = {
val routingTables = createRoutingTables(edges, new HashPartitioner(numPartitions))
val vertexPartitions = routingTables.mapPartitions({ routingTableIter =>
val routingTable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import org.apache.spark.graphx.util.collection.PrimitiveKeyOpenHashMap
* @param activeSet an optional active vertex set for filtering computation on the edges
*/
private[graphx]
class EdgePartition[@specialized(Char, Int, Boolean, Byte, Long, Float, Double) ED: ClassTag, VD: ClassTag](
class EdgePartition[
@specialized(Char, Int, Boolean, Byte, Long, Float, Double) ED: ClassTag, VD: ClassTag](
val srcIds: Array[VertexId],
val dstIds: Array[VertexId],
val data: Array[ED],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ class GraphImpl[VD: ClassTag, ED: ClassTag] protected (
// updateF preserves type, so we can use incremental replication
val newVerts = vertices.leftJoin(other)(updateF).cache()
val changedVerts = vertices.asInstanceOf[VertexRDD[VD2]].diff(newVerts)
val newReplicatedVertexView =
replicatedVertexView.asInstanceOf[ReplicatedVertexView[VD2, ED]].updateVertices(changedVerts)
val newReplicatedVertexView = replicatedVertexView.asInstanceOf[ReplicatedVertexView[VD2, ED]]
.updateVertices(changedVerts)
new GraphImpl(newVerts, newReplicatedVertexView)
} else {
// updateF does not preserve type, so we must re-replicate all vertices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class ReplicatedVertexView[VD: ClassTag, ED: ClassTag](
var hasDstId: Boolean = false) {

/**
* Return a new `ReplicatedVertexView` with the specified `EdgeRDD`, which must have the same shipping level.
* Return a new `ReplicatedVertexView` with the specified `EdgeRDD`, which must have the same
* shipping level.
*/
def withEdges[VD2: ClassTag, ED2: ClassTag](
edges_ : EdgeRDD[ED2, VD2]): ReplicatedVertexView[VD2, ED2] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ object ShippableVertexPartition {
apply(iter, RoutingTablePartition.empty, null.asInstanceOf[VD])

/**
* Construct a `ShippableVertexPartition` from the given vertices with the specified routing table,
* filling in missing vertices mentioned in the routing table using `defaultVal`.
* 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)
Expand Down

0 comments on commit ae36110

Please sign in to comment.