GitHub user maropu opened a pull request:

    https://github.com/apache/spark/pull/5549

    [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/5549.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 #5549
    
----
commit 084ae5a80c96cb481c2b7d3f5aced99b09619057
Author: Takeshi YAMAMURO <linguin....@gmail.com>
Date:   2015-04-17T04:05:13Z

    Add getPartitionStrategy

commit c46d126a044d089f70b1c38b3cdb4979b6ffe589
Author: Takeshi YAMAMURO <linguin....@gmail.com>
Date:   2015-04-17T04:54:38Z

    Add an new entry in MimaExlucdes.scala

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to