Titan + Cassandra和字符串顶点ID [英] Titan+Cassandra and String Vertex Ids

查看:81
本文介绍了Titan + Cassandra和字符串顶点ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过将 graph.set-vertex-id设置为true,看来我们可以让Titan 1.0使用自定义的长id。有什么方法可以将非长(即字符串)ID用作顶点ID?看到Tinkerpop API支持字符串,并且有一个名为 StringIds的功能,是否可以通过某种方式启用该功能?我正在将Titan与Cassandra一起使用。

It looks like we can get Titan 1.0 use custom long ids by setting "graph.set-vertex-id" to true. Is there some way to use non-long (i.e. String) ids as Vertex Ids? Seeing that the Tinkerpop api supports Strings, and there's a feature called "StringIds", is there some way of enabling that feature? I'm using Titan with Cassandra.

推荐答案

我认为这与Titan的内部结构背道而驰。 Titan开发人员之一建议在此处使用您自己的索引属性。在此处此处指出应使用唯一的索引属性。

I think this goes against Titan's internal structure. One of the Titan devs recommends here to just use your own indexed property. This is reiterated here and here stating that unique indexed properties should be used.

我认为这样做的原因是内部ID实际上是指系统上的位置。如所述此处

I think the reason for this is that the internal ids actually refer to locations on the system. As stated here:


(Titan唯一地分配给每个顶点的)(64位)顶点ID是指向包含顶点邻接表的行的键。

The (64 bit) vertex id (which Titan uniquely assigns to every vertex) is the key which points to the row containing the vertex’s adjacency list.

这篇关于Titan + Cassandra和字符串顶点ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆