Gremlin

felix.shao2025-02-18

Gremlin

1 概述

2 安装

2.1 安装资源

 安装资源如下

资源包备注链接
server服务端服务端下载open in new window
console客户端客户端下载open in new window
src源码源码下载open in new window
air-routes航线图示例air-routes 资料下载open in new window

2.2 安装

 安装命令如下:

$ unzip apache-tinkerpop-gremlin-console-3.6.2-bin.zip
$ cd apache-tinkerpop-gremlin-console-3.6.2
$ bin/gremlin.sh

2.3 入门文档

3 航线图示例使用

 使用命令示例:

# 1 启动 bat
$ gremlin.bat 

# 2 准备工作
# 2.1 graph-master.zip 解压后放到和 gremlin 同盘根目录, 即 /gremlinData/graph-master
# 2.2 复制 /gremlinData/graph-master/sample-data/air-routes.graphml 到 /gremlinData/mydata/air-routes.graphml
# 2.3 修改 /gremlinData/graph-master/sample-data/load-air-routes-graph.groovy 中的文本内容: 即 /mydata/air-routes.graphml 改为 /gremlinData/mydata/air-routes.graphml
# 2.4 执行以下命令启动

# 3 加载文件
$ :load /gremlinData/graph-master/sample-data/load-air-routes-graph.groovy

# 4 测试,具体使用示例见 graph-master.zip 里面的源码
$ graph.toString()
==>tinkergraph[vertices:3619 edges:50148]

参考文献

Last Updated 2/18/2025, 5:05:12 PM