You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (JIRA)" <ji...@apache.org> on 2015/01/21 18:10:34 UTC

[jira] [Updated] (SPARK-5352) Add getPartitionStrategy in Graph

     [ https://issues.apache.org/jira/browse/SPARK-5352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Takeshi Yamamuro updated SPARK-5352:
------------------------------------
    Description: 
Graph remembers an applied partition strategy in partitionBy() and
returns it via getPartitionStrategy().
This is useful in case of the following situation;

val g1 = GraphLoader.edgeListFile(sc, "graph.txt")
val g2 = g1.partitionBy(EdgePartition2D, 2)

// Modify (e.g., add, contract, ...) edges in g2
val newEdges = ...

// Re-build a new graph based on g2
val g3 = Graph(g1.vertices, newEdges)

// Partition edges in a similar way of g2
val g4 = g3.partitionBy(g2.getPartitionStrategy, 2)

  was:
Graph remembers an applied partition strategy in paritionBy() and
returns it via getPartitionStrategy().
This is useful in case of the following situation;

val g1 = GraphLoader.edgeListFile(sc, "graph.txt")
val g2 = g1.partitionBy(EdgePartition2D, 2)

// Modifiy (e.g., add, contract, ...) edges in g2
val newEdges = ...

// Re-build a new graph based on g2
val g3 = Graph(g1.vertices, newEdges)

// Partition edges in a similar way of g2
val g4 = g3.partitionBy(g2.getParitionStrategy, 2)


> Add getPartitionStrategy in Graph
> ---------------------------------
>
>                 Key: SPARK-5352
>                 URL: https://issues.apache.org/jira/browse/SPARK-5352
>             Project: Spark
>          Issue Type: Improvement
>          Components: GraphX
>            Reporter: Takeshi Yamamuro
>            Priority: Minor
>
> Graph remembers an applied partition strategy in partitionBy() and
> returns it via getPartitionStrategy().
> This is useful in case of the following situation;
> val g1 = GraphLoader.edgeListFile(sc, "graph.txt")
> val g2 = g1.partitionBy(EdgePartition2D, 2)
> // Modify (e.g., add, contract, ...) edges in g2
> val newEdges = ...
> // Re-build a new graph based on g2
> val g3 = Graph(g1.vertices, newEdges)
> // Partition edges in a similar way of g2
> val g4 = g3.partitionBy(g2.getPartitionStrategy, 2)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org