Amazon web services 如何用示例数据集填充Titan?
我正在关注如何作为存储后端运行。似乎有很多方法可以查询我的图形(CLI,通过JSON和Web UI)。我的Amazon web services 如何用示例数据集填充Titan?,amazon-web-services,amazon-dynamodb,titan,gremlin,rexster,Amazon Web Services,Amazon Dynamodb,Titan,Gremlin,Rexster,我正在关注如何作为存储后端运行。似乎有很多方法可以查询我的图形(CLI,通过JSON和Web UI)。我的rexster.xml引用了一个名为“v054”的图名 但是如何将图形持久化到存储层并进行更新呢? 从myrexster.xml: <graph-name>v054</graph-name> <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</g
rexster.xml
引用了一个名为“v054”的图名
但是如何将图形持久化到存储层并进行更新呢?
从myrexster.xml
:
<graph-name>v054</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location>/tmp/titan</graph-location>
<graph-read-only>false</graph-read-only>
使用-sharedDb
运行DynamoDB Local后,您将看到创建的以下表格:
{
"TableNames": [
"v054_edgestore",
"v054_graphindex",
"v054_system_properties",
"v054_systemlog",
"v054_titan_ids",
"v054_txlog"
]
}
更新2
通过运行下面提到的命令,我可以获得对我的图形的引用。但是,我必须使用完全限定名TitanFactory.open()
(见下文)。有关更多信息,请参阅
gremlin> conf = new BaseConfiguration()
gremlin> conf.setProperty("storage.backend", "com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager")
gremlin> conf.setProperty("storage.dynamodb.client.endpoint", "http://localhost:4567")
gremlin> conf.setProperty("index.search.backend", "elasticsearch")
gremlin> conf.setProperty("index.search.directory", "/tmp/searchindex")
gremlin> conf.setProperty("index.search.elasticsearch.client-only", "false")
gremlin> conf.setProperty("index.search.elasticsearch.local-mode", "true")
gremlin> conf.setProperty("index.search.elasticsearch.interface", "NODE")
gremlin> g = TitanFactory.open(conf)
==>javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: TitanFactory for class: Script12
gremlin> g = com.thinkaurelius.titan.core.TitanFactory.open(conf)
==>titangraph[com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager:[127.0.0.1]]
你发布了雷克斯特狗屋的截图。它嵌入了一个小精灵的外壳。单击顶部的Gremlin按钮,开始使用Gremlin脚本修改新图形。有关添加图形数据的gremlin命令的示例,请参阅,有关更多示例,请参阅。记得在创建自己的图形数据时调用g.commit()(不要使用Marvel数据集或神的图形之类的示例图形数据。但是我如何在gremlin控制台中实际引用我的v054
图形?在控制台中评估v054
会导致MissingPropertyException
。但是我可以评估(和提交)另一个图形g
。但是,即使在运行g.commit()之后
,当我尝试使用列出时,我没有看到创建任何DynamoDB本地表。您提到了一个很好的观点。您需要确保DynamoDB本地Shell脚本请求中的区域和凭据与Rexster中使用的Titan DynamoDB存储后端的所选区域和凭据相同。它是在启动DynamoDB Local时,使用-shared标志
可能更容易,这样,本地实例中的相同表将被使用,而不管您的区域/凭证设置如何。根据文档,标志是-sharedDb
。是的,但如果是这样的话,不应该使用-sha中的启动DynamoDB Local
配置文件吗redDB也一样?现在它只使用内存中的-inMemory
。即使这样,我怎么能在Gremlin控制台中引用默认的v054
Titan DB图呢?我昨天访问了pom.xml,使用-sharedDb
。
gremlin> conf = new BaseConfiguration()
gremlin> conf.setProperty("storage.backend", "com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager")
gremlin> conf.setProperty("storage.dynamodb.client.endpoint", "http://localhost:4567")
gremlin> conf.setProperty("index.search.backend", "elasticsearch")
gremlin> conf.setProperty("index.search.directory", "/tmp/searchindex")
gremlin> conf.setProperty("index.search.elasticsearch.client-only", "false")
gremlin> conf.setProperty("index.search.elasticsearch.local-mode", "true")
gremlin> conf.setProperty("index.search.elasticsearch.interface", "NODE")
gremlin> g = TitanFactory.open(conf)
==>javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: TitanFactory for class: Script12
gremlin> g = com.thinkaurelius.titan.core.TitanFactory.open(conf)
==>titangraph[com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager:[127.0.0.1]]