janusgraph 常见问题

janusgraph 常见问题

1. 提示字符串无法转为Map
这是remote方式访问遇到的问题,需要将remote.yaml配置文件中的序列化配置serializeResultToString改为false
2. org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.kryo.KryoException: Encountered unregistered class ID: 65536
这是remote方式访问遇到的问题,需要在remote.yaml配置文件中加入序列化类配置,custom: [org.janusgraph.graphdb.relations.RelationIdentifier]
这是一种指定类型的解决方式,janusgraph driver已经提供通用的方式,IoRegistry,只需要在配置中添加配置

serializer:  className: 
org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0  config:    serializeResultToString: false    #custom: [org.janusgraph.graphdb.relations.RelationIdentifier]    ioRegistries: 
[org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry]

参考解释

The IoRegistry tells the serializer what classes from the graph provider to auto-register during serialization. Gremlin Server roughly uses this same approach when it configures its serializers.

参考文献
3. cypher for gremlin驱动只能使用websocket连接janusgraph server
cypher for gremlin 没有支持rest的方式,如果要使用http协议部署janusgraph,并且想使用cypher语法,那就是只能在客户端转换cypher语法,然后将gremlin语句通过rest的方式调用janusgraph server

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值