前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >JanusGraph数据导入到Gephi的方法

JanusGraph数据导入到Gephi的方法

作者头像
公号:咻咻ing
发布2019-12-29 19:37:37
1.8K0
发布2019-12-29 19:37:37
举报
文章被收录于专栏:公众号:咻咻ing公众号:咻咻ing

对于支持Gremlin语法的图数据库,可以通过Gephi中的Graph Streaming插件将输入导入到Gephi中,进行数据可视化展示。

在这里不在介绍通过Gremlin连接JanusGraph数据库的部分了,主要讲解Graph Streaming插件的使用。

Graph Streaming 插件使用

  1. 安装插件 在菜单栏选择 ''工具" -> "插件" -> "可用插件" 中找到Graph Streaming 点击进行安装。安装完成后在左下方的菜单栏会显示Streaming的选项卡
  1. 新建项目 在菜单栏选择 "文件" -> "新建项目","工作区" -> "重命名" 输入"workspace1" 对项目进行重命名。
  2. 启动Server 在"Streaming"选项卡,点击"Master"展开子类,选中"Master Server"右键点击选择"start",启动Server。
  1. Gremlin 连接# 查看使用的插件列表
代码语言:javascript
复制
# 查看使用的插件列表
gremlin> :plugin list
==>janusgraph.imports[active]
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.hadoop[active]
==>tinkerpop.spark[active]
==>tinkerpop.tinkergraph[active]

# 使用 tinkerpop.gephi 插件
gremlin> :plugin use tinkerpop.gephi
==>tinkerpop.gephi activated

gremlin> :plugin list
==>janusgraph.imports[active]
==>tinkerpop.server[active]
==>tinkerpop.gephi[active]
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.hadoop[active]
==>tinkerpop.spark[active]
==>tinkerpop.tinkergraph[active]

# 创建简单的 Modern 图
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]

# 连接到 tinkerpop.gephi 插件
gremlin> :remote connect tinkerpop.gephi
==>Connection to Gephi - http://localhost:8080/workspace1 with stepDelay:1000, startRGBColor:[0.0, 1.0, 0.5], colorToFade:g, colorFadeRate:0.7, startSize:10.0,sizeDecrementRate:0.33
gremlin> :> graph
Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)

# 连接到 tinkerpop.gephi 插件,设置port值
gremlin> :remote connect tinkerpop.gephi
==>Connection to Gephi - http://localhost:8080/workspace1 with stepDelay:1000, startRGBColor:[0.0, 1.0, 0.5], colorToFade:g, colorFadeRate:0.7, startSize:10.0,sizeDecrementRate:0.33
gremlin> :remote config port 8088
==>Connection to Gephi - http://localhost:8088/workspace1 with stepDelay:1000, startRGBColor:[0.0, 1.0, 0.5], colorToFade:g, colorFadeRate:0.7, startSize:10.0,sizeDecrementRate:0.33
gremlin> :> graph
==>tinkergraph[vertices:6 edges:6]
==>false

至此,图数据库中的数据已经导入到Gephi中。

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2019-12-18,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 咻咻ing 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Graph Streaming 插件使用
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档