@@ -51,8 +51,13 @@ Log out and back in to effect changes on ec2-user.
51
51
curl https://raw.githubusercontent.com/awslabs/dynamodb-janusgraph-storage-backend/master/src/test/resources/install-reqs.sh | bash
52
52
exit
53
53
```
54
- 2 . Use Docker and Docker Compose to bake DynamoDB Local into a container and start Gremlin Server with the DynamoDB Storage Backend for
55
- JanusGraph installed.
54
+ 2 . Clone the repository and change directories.
55
+
56
+ ``` bash
57
+ git clone https://github.com/awslabs/dynamodb-janusgraph-storage-backend.git && cd dynamodb-janusgraph-storage-backend
58
+ ```
59
+ 3. Use Docker and Docker Compose to bake DynamoDB Local into a container and start Gremlin Server with the DynamoDB
60
+ Storage Backend for JanusGraph installed.
56
61
57
62
` ` ` bash
58
63
docker build -t awslabs/dynamodblocal ./src/test/resources/dynamodb-local-docker \
@@ -62,53 +67,53 @@ JanusGraph installed.
62
67
&& docker-compose -f src/test/resources/docker-compose.yml up -d \
63
68
&& docker exec -i -t dynamodb-janusgraph /var/jg/bin/gremlin.sh
64
69
` ` `
65
- 3 . After the Gremlin shell starts, set it up to execute commands remotely.
70
+ 4 . After the Gremlin shell starts, set it up to execute commands remotely.
66
71
67
72
` ` ` groovy
68
73
:remote connect tinkerpop.server conf/remote.yaml session
69
74
:remote console
70
75
` ` `
71
- 4 . Load the first 100 lines of the Marvel graph using the Gremlin shell.
76
+ 5 . Load the first 100 lines of the Marvel graph using the Gremlin shell.
72
77
73
78
` ` ` groovy
74
79
com.amazon.janusgraph.example.MarvelGraphFactory.load(graph, 100, false)
75
80
` ` `
76
- 5 . Print the characters and the comic-books they appeared in where the
81
+ 6 . Print the characters and the comic-books they appeared in where the
77
82
characters had a weapon that was a shield or claws.
78
83
79
84
` ` ` groovy
80
85
g.V ().has(' weapon' , within(' shield' ,' claws' )).as(' weapon' , ' character' , ' book' ).select(' weapon' , ' character' ,' book' ).by(' weapon' ).by(' character' ).by(__.out(' appeared' ).values(' comic-book' ))
81
86
` ` `
82
- 6 . Print the characters and the comic-books they appeared in where the
87
+ 7 . Print the characters and the comic-books they appeared in where the
83
88
characters had a weapon that was not a shield or claws.
84
89
85
90
` ` ` groovy
86
91
g.V ().has(' weapon' ).has(' weapon' , without(' shield' ,' claws' )).as(' weapon' , ' character' , ' book' ).select(' weapon' , ' character' ,' book' ).by(' weapon' ).by(' character' ).by(__.out(' appeared' ).values(' comic-book' ))
87
92
` ` `
88
- 7 . Print a sorted list of the characters that appear in comic-book AVF 4.
93
+ 8 . Print a sorted list of the characters that appear in comic-book AVF 4.
89
94
90
95
` ` ` groovy
91
96
g.V ().has(' comic-book' , ' AVF 4' ).in(' appeared' ).values(' character' ).order()
92
97
` ` `
93
- 8 . Print a sorted list of the characters that appear in comic-book AVF 4 that
98
+ 9 . Print a sorted list of the characters that appear in comic-book AVF 4 that
94
99
have a weapon that is not a shield or claws.
95
100
96
101
` ` ` groovy
97
102
g.V ().has(' comic-book' , ' AVF 4' ).in(' appeared' ).has(' weapon' , without('shield','claws')).values('character').order ()
98
103
` ` `
99
- 9 . Exit remote mode and Control-C to quit.
104
+ 10 . Exit remote mode and Control-C to quit.
100
105
101
106
` ` ` groovy
102
107
:remote console
103
108
` ` `
104
- 10 . Clean up the composed Docker containers.
109
+ 11 . Clean up the composed Docker containers.
105
110
106
111
` ` ` bash
107
112
docker-compose -f src/test/resources/docker-compose.yml stop
108
113
` ` `
109
114
110
115
# ## Load the Graph of the Gods
111
- 1. Repeat steps 1 through 3 of the Marvel graph section.
116
+ 1. Repeat steps 3 and 4 of the Marvel graph section, cleaning up the server directory beforehand with ` rm -rf server ` .
112
117
2. Load the Graph of the Gods.
113
118
114
119
` ` ` groovy
@@ -203,7 +208,7 @@ CloudFormation template that you just downloaded.
203
208
CloudFormation to create IAM resources." Then, click Create.
204
209
8. Start the Gremlin console on the host through SSH. You can just copy paste the `GremlinShell` output of the
205
210
CloudFormation template and run it on your command line.
206
- 9. Repeat step 3 of the Marvel graph section above.
211
+ 9. Repeat steps 4 and onwards of the Marvel graph section above.
207
212
208
213
## Data Model
209
214
The Amazon DynamoDB Storage Backend for JanusGraph has a flexible data model that
0 commit comments