gpt4 book ai didi

java - 通过 Gremlin 连接到 DynamoDB Local

转载 作者:行者123 更新时间:2023-12-01 10:53:50 26 4
gpt4 key购买 nike

我正在尝试让 Titan 运行 DynamoDB 本地后端。我已严格按照 github 中的步骤进行操作,但无法让 Gremlin 连接:

...[truncated previous commands. Identical to those in github link]
gremlin> g = TitanFactory.open(conf)
Could not instantiate implementation: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Could not instantiate implementation:
com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager at
com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55) at
com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
...[truncated by gph]

通过 maven 启动 dynamodb 如下所示:

[8][dynamodb-titan-storage-backend]>mvn test -Pstart-dynamodb-local
[INFO] Scanning for projects...[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Amazon DynamoDB Storage Backend for Titan 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-release-repo (s3://dynamodblocal/release): Cannot access s3://dynamodblocal/release with type default using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-snapshot-repo (s3://dynamodblocal/snapshot): Cannot access s3://dynamodblocal/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ dynamodb-titan054-storage-backend ---
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (default) @ dynamodb-titan054-storage-backend ---
Initializing DynamoDB Local with the following configuration:
Port: 4567
InMemory: true
DbPath: null
SharedDb: false
shouldDelayTransientStatuses: false
CorsParams: *

我是 dynamodb 和 titan 的新手,所以我真的不知道如何解决这个问题。

最佳答案

我能够通过遵循亚马逊文档 Installing and Running the DynamoDB Storage Backend for Titan 来运行 gremlin .

您已经快完成了,但是 mvn test -Pstart-dynamodb-localmvn test -Pstart-gremlin 需要同时运行。

因此,在运行 mvn test -Pstart-dynamodb-local 后,您需要保持运行状态,打开一个单独的终端/ssh session ,cd 到以下位置您的 dynamodb-titan-storage-backend 的 git 克隆,然后在第一个命令仍在运行时运行 mvn test -Pstart-gremlin :

/path/to/dynamodb-titan-storage-backend/# mvn test -Pstart-gremlin
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Amazon DynamoDB Storage Backend for Titan 1.0.0
[INFO] ------------------------------------------------------------------------
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-release-repo (s3://dynamodblocal/release): Cannot access s3://dynamodblocal/release with type default using the available connector factories: BasicRepositoryConnectorFactory
[WARNING] Could not transfer metadata com.amazonaws:aws-java-sdk-dynamodb/maven-metadata.xml from/to maven-s3-snapshot-repo (s3://dynamodblocal/snapshot): Cannot access s3://dynamodblocal/snapshot with type default using the available connector factories: BasicRepositoryConnectorFactory
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ dynamodb-titan054-storage-backend ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ dynamodb-titan054-storage-backend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ dynamodb-titan054-storage-backend ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ dynamodb-titan054-storage-backend ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.10:copy-dependencies (copy-dependencies) @ dynamodb-titan054-storage-backend ---
[INFO] com.google.protobuf:protobuf-java:jar:2.5.0 already exists in destination.
[INFO] com.sun.jersey:jersey-json:jar:1.9 already exists in destination.
[INFO] stax:stax-api:jar:1.0.1 already exists in destination.

...[向前跳过]

[INFO] org.openrdf.sesame:sesame-queryalgebra-evaluation:jar:2.7.10 already exists in destination.
[INFO] com.sun.jersey:jersey-server:jar:1.9 already exists in destination.
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ dynamodb-titan054-storage-backend ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ dynamodb-titan054-storage-backend ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- exec-maven-plugin:1.2:exec (default) @ dynamodb-titan054-storage-backend ---

\,,,/
(o o)
-----oOOo-(_)-oOOo-----
0 [main] WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
gremlin>

关于java - 通过 Gremlin 连接到 DynamoDB Local,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33722936/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com