您好:我正在使用JanusGraph和https://github.com/awslabs/dynamodb-janusgraph-storage-backend
中的DynamoDB示例此外,我使用Spark - Scala - Gremlin Scala框架连接到JanusGraph。当我使用Cassandra作为后端时,一切都有效,但当我切换到使用DynamoDB时,我开始收到后端异常错误。
我的conf看起来像这样
val conf = new BaseConfiguration
conf.setProperty("gremlin.graph","org.janusgraph.core.JanusGraphFactory")
conf.setProperty("storage.write-time","1 ms")
conf.setProperty("storage.read-time","1 ms")
conf.setProperty("storage.backend","com.amazon.janusgraph.diskstorage.dynamodb.DynamoDBStoreManager")
conf.setProperty("storage.dynamodb.client.signing-region","us-east-1")
conf.setProperty("storage.dynamodb.client.endpoint","http://127.0.0.1:8000")
val graph = JanusGraphFactory.open(conf)
我可以很好地连接DynamoDB,但是当我开始插入数据时,我会遇到后端异常。
以下是错误日志的一部分
错误org.janusgraph.graphdb.database.StandardJanusGraph - 由于系统提交中的存储异常而无法提交事务[1] org.janusgraph.core.JanusGraphException:由于后端异常而无法执行操作 在org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:57) 在org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:95) at org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:143) 在org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:200) 在org.janusgraph.diskstorage.BackendTransaction.commit(BackendTransaction.java:150) 在org.janusgraph.graphdb.database.StandardJanusGraph.commit(StandardJanusGraph.java:703) at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.commit(StandardJanusGraphTx.java:1363) 在org.janusgraph.graphdb.tinkerpop.JanusGraphBlueprintsGraph $ GraphTransaction.doCommit(JanusGraphBlueprintsGraph.java:272) 在org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:105) 在$ line。$读取$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ IW $$ IW $$ IW $$ IW $$ anonfun $ 1 $$ anonfun $ $适用1.适用(84) 在$ line。$读取$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ iw $$ IW $$ IW $$ IW $$ IW $$ anonfun $ $$ 1 $ anonfun申请$ 1.适用(80)
知道这里发生了什么。我是DynamoDB的新手。这在Cassandra中运作良好
答案 0 :(得分:0)
为什么你知道你有联系?我认为您必须在配置中提供凭据。例如:
conf.setProperty("storage.dynamodb.client.credentials.class-name", "com.amazonaws.auth.BasicAWSCredentials")
conf.setProperty("storage.dynamodb.client.credentials.constructor-args", "ACCESS_KEY,SECRET_KEY")