在分布式模式下在Orientdb中打开数据库(Opening database in Orientdb in distributed mode)

编程入门 行业动态 更新时间:2024-10-14 04:30:13
分布式模式下在Orientdb中打开数据库(Opening database in Orientdb in distributed mode)

我试图在orientdb中使用pyorient打开一个数据库,它在分布式模式下配置和启动。 但是数据库的打开并没有发生,因为该过程没有完成,也没有抛出任何错误。 我能够使用HTTP端口打开并访问节点 - 2480.但是当我尝试使用二进制端口--2424时,我遇到了这个问题。

import pyorient client = pyorient.OrientDB("localhost", 2424) session_id = client.connect( "xxxx", "xxxxx") client.db_open( "orient_poc", "xxxx", "xxxx")

怎么解决这个?

I am trying to open a database using pyorient in orientdb which was configured and started in distributed mode. But the opening of database is not happening as the process is not completing as well as not throwing any error. I am able to open and access the nodes using the HTTP port - 2480. But when I try to use the binary port - 2424, I am getting this issue.

import pyorient client = pyorient.OrientDB("localhost", 2424) session_id = client.connect( "xxxx", "xxxxx") client.db_open( "orient_poc", "xxxx", "xxxx")

How to resolve this ?

最满意答案

这是因为pyorient的CSV序列化程序中存在错误。 您无法以分布式模式连接到OrientDB。

OrientSerialization.CSV无法解析orientDB协议并进入无限循环。

目前有一个关于pyorient的开发分支,它实现了缺少的二进制序列化器(OrientSerialization.Binary)。

安装它:

pip install https://github.com/mogui/pyorient/tarball/develop#egg=pyorient

设置序列化器如下:

client = pyorient.OrientDB("localhost", 2424, serialization_type=pyorient.OrientSerialization.Binary)

这对我有用。

This is because of a bug in pyorient's CSV serializer. You can't connect to OrientDB in distributed mode.

The OrientSerialization.CSV can't parse the orientDB protocol and goes into an infinite loop.

There is currently a development branch on pyorient that implements the missing binary serialiser (OrientSerialization.Binary).

Install it with:

pip install https://github.com/mogui/pyorient/tarball/develop#egg=pyorient

Set your serialiser as follows:

client = pyorient.OrientDB("localhost", 2424, serialization_type=pyorient.OrientSerialization.Binary)

That worked for me.

更多推荐

本文发布于:2023-07-06 07:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047417.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分布式   数据库   模式下   Orientdb   mode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!