问题
I have graph in Spark collected from different data sources. Is there simple way to export Spark GraphX graph to Gephi for visualization using scala? Any common data formats?
回答1:
As far as I am concerned the only way you can export graph directly is to use some variation of CSV. All other formats supported by Gephi cannot be easily written in parallel.
Problem with using basic CSV is that it doesn't support attributes. Since amount of data you can visualize using Gephi is rather limited a better approach could be to simply collect edges and vertices and create local file using a format that suits your needs, for example with gexf4j.
A mixed approach is to export data with properties to CSV file, import into Neo4j, and visualize using Neo4j plugin.
来源:https://stackoverflow.com/questions/34275671/how-to-export-spark-graphx-graph-to-gephi-using-scala