无效的ASCII编码偏移量

时间:2016-10-25 06:14:57

标签: java titan tinkerpop3

我正在从Titan 0.5.4迁移到1.0.0。为了维护我们的数据模型,我必须为集合(Java本机类型)实现自定义序列化程序。该序列化程序利用com.thinkaurelius.titan.graphdb.database.serialize.attribute.StringSerializer将JSON序列化集合存储为字符串。在使用序列化程序时,我设法创建既不能读取也不能删除的边缘。既不是通过Java代码也不是通过Gremlin shell。我收到的例外是:

Caused by: java.lang.IllegalArgumentException: Invalid ASCII encoding offset: 176
    at com.thinkaurelius.titan.graphdb.database.serialize.attribute.StringSerializer.read(StringSerializer.java:105)
    at ch.vivates.ams.graph.titan.serializer.AbstractCollectionJsonSerializer.read(AbstractCollectionJsonSerializer.java:28)
    at ch.vivates.ams.graph.titan.serializer.AbstractCollectionJsonSerializer.read(AbstractCollectionJsonSerializer.java:14)
    at com.thinkaurelius.titan.graphdb.database.serialize.StandardSerializer.readObjectNotNullInternal(StandardSerializer.java:259)
    at com.thinkaurelius.titan.graphdb.database.serialize.StandardSerializer.readObjectInternal(StandardSerializer.java:249)
    at com.thinkaurelius.titan.graphdb.database.serialize.StandardSerializer.readObject(StandardSerializer.java:229)
    at com.thinkaurelius.titan.graphdb.database.EdgeSerializer.readPropertyValue(EdgeSerializer.java:191)
    at com.thinkaurelius.titan.graphdb.database.EdgeSerializer.readInline(EdgeSerializer.java:177)
    at com.thinkaurelius.titan.graphdb.database.EdgeSerializer.parseRelation(EdgeSerializer.java:149)
    at com.thinkaurelius.titan.graphdb.database.EdgeSerializer.readRelation(EdgeSerializer.java:60)
    at com.thinkaurelius.titan.graphdb.transaction.RelationConstructor.readRelationCache(RelationConstructor.java:27)
    at com.thinkaurelius.titan.graphdb.relations.CacheEdge.getPropertyMap(CacheEdge.java:90)
    at com.thinkaurelius.titan.graphdb.relations.CacheEdge.getPropertyKeysDirect(CacheEdge.java:102)
    at com.thinkaurelius.titan.graphdb.database.IndexSerializer.getIndexUpdates(IndexSerializer.java:264)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.prepareCommit(StandardTitanGraph.java:517)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.commit(StandardTitanGraph.java:702)
    at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.commit(StandardTitanTx.java:1352)
    ... 39 more

尝试读取有问题边缘的任何属性时以及尝试删除它时都会抛出异常。例如。

gremlin> traversal.E('5onz-j5k-6c5-cu0').drop()
gremlin> graph.tx().commit()

会在提交时产生上述异常。

虽然我可以在我的开发环境中删除Cassandra键空间,然后重新开始,我想知道生产环境的策略是从图表中清除这样一个有毒元素是什么?

0 个答案:

没有答案