通过Gremlin连接到DynamoDB Local

时间:2015-11-15 17:52:25

标签: java maven amazon-web-services amazon-s3 titan

我试图让DynamanDB本地后端运行Titan。我已经密切关注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的新手,所以我真的不知所措。

1 个答案:

答案 0 :(得分:1)

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

你几乎就在那里,但mvn test -Pstart-dynamodb-localmvn test -Pstart-gremlin需要同时运行。

因此,在您运行mvn test -Pstart-dynamodb-local之后,您需要保持正常运行,打开一个单独的终端/ ssh会话,cd到您的dynamodb-titan-storage的git clone的位置后端然后在第一个命令仍在运行时运行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>