How to export Spark GraphX graph to Gephi using scala

怎甘沉沦 提交于 2019-12-13 04:00:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!