Gremlin 服务器连接到 Orient DB

Gremlin Server connect to Orient DB

我这样启动我的 Gremlin NEO4J

./gremlin-server.sh conf/gremlin-server-neo4j.yaml

我已经安装了 OrientDB 社区版,它似乎是通过 IP:2480/studio/index.htm

运行的文件

现在我正在尝试将我的 Gremlin 服务器连接到 Orient DB,但我找不到任何方法来实现它

Python 连接 Gremlin 服务器的代码

from gremlin_python.driver import client as driver

# Constants for connections to gremlin
GREMLIN_VAR = 'g'
GREMLIN_URL = 'ws://localhost:8182/gremlin'
client = driver.Client(GREMLIN_URL, GREMLIN_VAR)

我发现但没有帮助的东西

  1. V3 doc 但他们使用的是 Java 而不是 Python
  2. orientdb-server-config.xml 但我需要 yaml 文件 python
  3. gremlin-server.sh -i org.apache.tinkerpop orientdb-gremlin 3.3.1 抛出错误'[未解决的依赖关系:org.apache.tinkerpop#orientdb -gremlin;3.3.1: 未找到]'
  4. 'orientdb-community-importers-2.2.31/bin' 执行了一个名为 'gremlin.sh' 的文件,但我无法执行类似 g = graph.traversal() 的操作
    1. 尝试了“./gremlin-server.sh -i com.orientechnologies orientdb-gremlin 2.2.31”,它安装了一些东西,但我不知道如何继续。

据我了解,您使用的是非常旧版本的配置 orientdb 在最新版本中使用 orientdb-gremlin 3.0.2 他们将 gremlin 嵌入到 orientdb 中,对于下载依赖项,请使用此 ./gremlin-server.sh -i com.orientechnologies orientdb-gremlin 3.0.2

根据来自 OP 的更多信息,添加

gremlin.graph=org.apache.tinkerpop.gremlin.orientdb.OrientFactory
orient-url=plocal:txt/GremlinServer
orient-user=admin
orient-pass=admin

希望这对您有所帮助

谢谢