GitHub user maropu opened a pull request:
https://github.com/apache/spark/pull/4138
[SPARK-5352][GraphX] Add getPartitionStrategy in Graph
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)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/maropu/spark PartitionStrategyInGraph
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/4138.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4138
----
commit 9fd03a64af3ab1160461b94aa7552b897d58059a
Author: Takeshi Yamamuro <[email protected]>
Date: 2015-01-21T16:49:37Z
Add getPartitionStrategy in Graph
----
---
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]