How to export Spark GraphX graph to Gephi using sc

2019-09-19 04:26发布

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条回答
倾城 Initia
2楼-- · 2019-09-19 04:28

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.

查看更多
登录 后发表回答