【发布时间】:2016-08-11 12:03:22
【问题描述】:
我正在尝试使用 gremlin-driver 通过 WebSockets 查询服务器 Titan 实例。 所以我有下一个依赖:
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-driver</artifactId>
<version>3.1.1-incubating</version>
</dependency>
尝试使用下一条命令获取值:
List<Result> some = client.submit("g.V().has(T.label, marketplace).has('marketplace_product_id', marketplace_product_id)", params).some(1).get();
得到下一个异常:
WARN o.a.t.g.driver.MessageSerializer - Response [PooledUnsafeDirectByteBuf(ridx: 136, widx: 136, cap: 136)] could not be deserialized by org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0.
13:41:36.879 [gremlin-driver-loop-1] ERROR o.a.t.g.d.Handler$GremlinResponseHandler - Could not process the response
io.netty.handler.codec.DecoderException: org.apache.tinkerpop.gremlin.driver.ser.SerializationException: java.lang.IndexOutOfBoundsException: Index: 121, Size: 0
在网络上没有找到关于使用 gremlin-driver 进行 CRUD 操作的可行示例。 有谁知道如何处理?
编辑 1: 使用 titan-1.0.0-hadoop1 还尝试使用驱动程序版本 3.0.1-incubating 并得到几乎相同的 IndexOutOfBoundsException。
【问题讨论】:
-
您使用的是什么版本的 Titan?
-
如果你使用的是Titan 1.0版本,可能你需要使用版本为
3.0.1-incubating的gremlin驱动