[英]add vertex to dynamodb using DynamoDB Storage Backend for Titan
I build Amazon DynamoDB Storage Backend for Titan. 我为Titan构建了Amazon DynamoDB存储后端。
I used this for build the env - based on template. 我用它来构建环境-基于模板。 After the resource was created I saw the dynamodb was created based on
dynamodb.properties
file. 创建资源后,我看到了基于
dynamodb.properties
文件创建了dynamodb.properties
。
After the resource was created, I open ssh to Linux EC2 and start bin/gremlin.sh.
创建资源后,我打开Linux EC2的ssh并启动
bin/gremlin.sh.
I wish to add data to dynamo, so I tried to add vertex by folliwing commands: 我希望将数据添加到发电机,因此我尝试通过以下命令添加顶点:
gremlin> bin/gremlin.sh
gremlin> :remote connect tinkerpop.server conf/remote.yaml
gremlin> g = TitanFactory.open("/usr/local/packages/dynamodb-titan100-storage-backend-1.0.0-hadoop1/conf/gremlin-server/dynamodb.properties")
gremlin> g.addVertex('date_of_birth').property('date_of_birth','1949-01-01')
vp[date_of_birth->1949-01-01]
but now when I examine my dynamodb table, I see titan_ids was changed , but the data is not clear to read. 但是现在当我检查我的dynamodb表时,我看到titan_ids已更改 ,但是尚不清楚数据是否可读。 The
'v'
column is still EMPTY, and not contain the vertex property. 'v'
列仍为EMPTY, 并且不包含vertex属性。
How can I solve that issue and see the vertex property in v
column? 如何解决该问题并在
v
列中查看vertex属性?
Titan Store data in binary format in the storage backend. Titan将二进制格式的数据存储在存储后端中。 So you should use gremlin query.
因此,您应该使用gremlin查询。
Example : 范例:
gremlin> graph = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g = graph.traversal()
gremlin> g.V().valueMap()
==>[name:[marko],age:[29]]
==>[name:[vadas],age:[27]]
==>[name:[lop],lang:[java]]
==>[name:[josh],age:[32]]
==>[name:[ripple],lang:[java]]
==>[name:[peter],age:[35]]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.