Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit da10fd9

Browse files
author
Alexander Patrikalakis
committed
Implement support for JanusGraph 0.2.1
1 parent 77e2a51 commit da10fd9

10 files changed

+74
-75
lines changed

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: java
22
sudo: required
33
dist: trusty
44
jdk:
5-
- oraclejdk8
5+
- openjdk8
66
cache:
77
directories:
88
- "${HOME}/.m2"
@@ -46,10 +46,6 @@ env:
4646
- MODULE="MultiMultiWriteStoreTestCategory" CATEGORY="MultiDynamoDBMultiWriteStoreTestCategory"
4747
#To be added
4848
- MODULE="GraphSimpleLogTest" CATEGORY="GraphSimpleLogTestCategory"
49-
addons:
50-
apt:
51-
packages:
52-
- oracle-java8-installer
5349
branches:
5450
only:
5551
- 1.0.0
@@ -64,5 +60,5 @@ script:
6460
#- aws cloudformation validate-template --region us-west-2 --template-body `pwd | sed -e 's/\//\/\//g' -e 's/^/file:\//' -e 's/$/\/\/dynamodb-janusgraph-tables-multiple\.yaml/'`
6561
notifications:
6662
email:
67-
63+
6864

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ account in the same region.
2828
multiple-item model based on graph size and utilization.
2929
* Test graph locally with DynamoDB Local.
3030
* Integrated with JanusGraph metrics.
31-
* JanusGraph 0.2.0 and TinkerPop 3.2.6 compatibility.
31+
* JanusGraph 0.2.1 and TinkerPop 3.2.9 compatibility.
3232
* Upgrade compatibility from Titan 1.0.0.
3333

3434
## Getting Started
@@ -73,10 +73,10 @@ Storage Backend for JanusGraph installed.
7373
:remote connect tinkerpop.server conf/remote.yaml session
7474
:remote console
7575
```
76-
5. Load the first 100 lines of the Marvel graph using the Gremlin shell.
76+
5. Load the first 10 lines of the Marvel graph using the Gremlin shell.
7777

7878
```groovy
79-
com.amazon.janusgraph.example.MarvelGraphFactory.load(graph, 100, false)
79+
com.amazon.janusgraph.example.MarvelGraphFactory.load(graph, 10, false)
8080
```
8181
6. Print the characters and the comic-books they appeared in where the
8282
characters had a weapon that was a shield or claws.

dynamodb-janusgraph-storage-backend-cfn.yaml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,64 @@
22
Description: This stack creates a VPC, an EC2 Amazon Linux host in the VPC with a
33
Public IP, and deploys Gremlin Server on it. **WARNING** This template creates
44
an Amazon EC2 instance. You will be billed for the AWS resources used if you
5-
create a stack from this template.
5+
create a stack from this template. AL 2018 AMI current as of 2018-06-22.
66
AWSTemplateFormatVersion: '2010-09-09'
77
Mappings:
88
AWSRegionArch2AMI:
99
ap-south-1:
10-
HVMG2: ami-52c7b43d
11-
HVM64: ami-f5c6b59a
10+
HVMG2: ami-5a8da735
11+
HVM64: ami-bc83a9d3
12+
eu-west-3:
13+
HVM64: ami-78f24205
14+
HVMG2: ami-d50bbaa8
1215
eu-west-2:
13-
HVMG2: ami-b6daced2
14-
HVM64: ami-b7daced3
16+
HVMG2: ami-b2b55cd5
17+
HVM64: ami-e2b35a85
1518
eu-west-1:
16-
HVMG2: ami-01ccc867
17-
PV64: ami-d1c0c4b7
18-
HVM64: ami-d3c0c4b5
19+
PV64: ami-3c5758d6
20+
HVM64: ami-41505fab
21+
HVMG2: ami-e4515e0e
1922
ap-northeast-2:
20-
HVM64: ami-9a15c7f4
21-
HVMG2: ami-9d15c7f3
23+
HVM64: ami-5bd46135
24+
HVMG2: ami-ebc47185
2225
ap-northeast-1:
23-
PV64: ami-30391657
24-
HVM64: ami-6a3b140d
25-
HVMG2: ami-923d12f5
26+
HVM64: ami-449f483b
27+
PV64: ami-6593441a
28+
HVMG2: ami-9c9443e3
2629
sa-east-1:
27-
HVM64: ami-2bccae47
28-
PV64: ami-36cfad5a
29-
HVMG2: ami-37cfad5b
30+
HVM64: ami-09d58f65
31+
PV64: ami-6dd58f01
32+
HVMG2: ami-83d58fef
3033
ca-central-1:
31-
HVMG2: ami-0bd66a6f
32-
HVM64: ami-73d06c17
34+
HVMG2: ami-03e86a67
35+
HVM64: ami-49e86a2d
3336
ap-southeast-1:
34-
PV64: ami-ab5ce5c8
35-
HVM64: ami-b65de4d5
36-
HVMG2: ami-fc5ae39f
37+
PV64: ami-c8fcffb4
38+
HVM64: ami-d6fdfeaa
39+
HVMG2: ami-ed838091
3740
ap-southeast-2:
38-
HVMG2: ami-162c2575
39-
HVM64: ami-762a2315
40-
PV64: ami-af2128cc
41+
HVMG2: ami-33f92051
42+
HVM64: ami-4ff8212d
43+
PV64: ami-c4c71ea6
4144
eu-central-1:
42-
HVM64: ami-506fbd3f
43-
HVMG2: ami-b968bad6
44-
PV64: ami-ba68bad5
45+
PV64: ami-1a744bf1
46+
HVMG2: ami-a058674b
47+
HVM64: ami-e056690b
4548
us-east-1:
46-
PV64: ami-668f1e70
47-
HVMG2: ami-c58c1dd3
48-
HVM64: ami-fd8617eb
49+
PV64: ami-b41445cb
50+
HVMG2: ami-cfe4b2b0
51+
HVM64: ami-f316478c
4952
us-east-2:
50-
HVMG2: ami-4191b524
51-
HVM64: ami-6693b703
53+
HVMG2: ami-40142d25
54+
HVM64: ami-ae0f36cb
5255
us-west-1:
53-
PV64: ami-0f85a06f
54-
HVMG2: ami-7a85a01a
55-
HVM64: ami-f887a298
56+
HVMG2: ami-0e86606d
57+
PV64: ami-1a876179
58+
HVM64: ami-25bf5946
5659
us-west-2:
57-
HVM64: ami-3234a652
58-
HVMG2: ami-4836a428
59-
PV64: ami-c737a5a7
60+
HVMG2: ami-0ad99772
61+
PV64: ami-21d09e59
62+
HVM64: ami-39d39d41
6063
AWSInstanceType2Arch:
6164
t2.nano:
6265
Arch: HVM64
@@ -511,7 +514,7 @@ Resources:
511514
- "mvn -version > /home/ec2-user/maven-installation-settings.log\n"
512515
- "export GREMLIN_SERVER_USERNAME='ec2-user'\n"
513516
- "export LOG_DIR=/var/log/gremlin-server\n"
514-
- "export SERVER_DIRNAME=dynamodb-janusgraph-storage-backend-1.2.0\n"
517+
- "export SERVER_DIRNAME=dynamodb-janusgraph-storage-backend-1.3.0\n"
515518
- "export SERVER_ZIP=${SERVER_DIRNAME}.zip\n"
516519
- "export PACKAGES_DIR=/usr/local/packages\n"
517520
- "export INSTALL_DIR=${PACKAGES_DIR}/${SERVER_DIRNAME}\n"
@@ -558,7 +561,7 @@ Outputs:
558561
- Fn::GetAtt:
559562
- WebServerInstance
560563
- PublicDnsName
561-
- " /usr/local/packages/dynamodb-janusgraph-storage-backend-1.2.0/bin/gremlin.sh"
564+
- " /usr/local/packages/dynamodb-janusgraph-storage-backend-1.3.0/bin/gremlin.sh"
562565
Description: Use this remote shell to interact with the graph.
563566
GremlinServerEndpoint:
564567
Value:

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.amazonaws</groupId>
44
<artifactId>dynamodb-janusgraph-storage-backend</artifactId>
5-
<version>1.2.0</version>
5+
<version>1.3.0</version>
66
<packaging>jar</packaging>
77
<name>Amazon DynamoDB Storage Backend for JanusGraph</name>
88
<url>https://github.com/awslabs/dynamodb-janusgraph-storage-backend</url>
99
<description>The Amazon DynamoDB Storage Backend for JanusGraph: Distributed Graph Database allows JanusGraph graphs to use DynamoDB as a storage backend.</description>
1010
<scm>
1111
<url>[email protected]:awslabs/dynamodb-janusgraph-storage-backend.git</url>
12-
<tag>jg0.2.0-1.2.0</tag>
12+
<tag>jg0.2.1-1.3.0</tag>
1313
</scm>
1414
<properties>
1515
<default.test.jvm.opts>-Xms256m -Xmx1280m -XX:+HeapDumpOnOutOfMemoryError</default.test.jvm.opts>
@@ -20,8 +20,8 @@
2020
<jdk.version>1.8</jdk.version>
2121
<aws.java.sdk.version>1.11.336</aws.java.sdk.version>
2222
<jackson.version>2.6.6</jackson.version>
23-
<janusgraph.version>0.2.0</janusgraph.version>
24-
<tinkerpop.version>3.2.6</tinkerpop.version>
23+
<janusgraph.version>0.2.1</janusgraph.version>
24+
<tinkerpop.version>3.2.9</tinkerpop.version>
2525
<dependency.plugin.version>3.0.2</dependency.plugin.version>
2626
<maven.assembly.plugin.version>3.1.0</maven.assembly.plugin.version>
2727
<maven.compiler.plugin.version>3.6.2</maven.compiler.plugin.version>

src/main/java/com/amazon/janusgraph/example/MarvelGraphFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public void run() {
203203
command.run();
204204
} catch (Throwable e) {
205205
final Throwable rootCause = ExceptionUtils.getRootCause(e);
206-
final String rootCauseMessage = Optional.ofNullable(rootCause.getMessage()).orElse("");
206+
final String rootCauseMessage = Optional.ofNullable(rootCause).map(Throwable::getMessage).orElse("");
207207
log.error("Error processing comic book {} {}", e.getMessage(), rootCauseMessage, e);
208208
}
209209
if (i++ % BATCH_SIZE == 0) {

src/test/resources/get-recent-al-amis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ aws ec2 describe-regions --query 'Regions[*].[RegionName]' | sed -e '/\[/d' -e '
2323
--region ${region} \
2424
--owners amazon \
2525
--filters "Name=root-device-type,Values=ebs" "Name=name,Values=amzn-ami-*" \
26-
--query 'Images[? CreationDate > `'${LATER_THAN_DATE}'` && !contains(Name, `minimal`) && !contains(Name, `nat`)].[ImageId, ImageLocation]' |\
26+
--query 'Images[? CreationDate>`'${LATER_THAN_DATE}'` && !contains(Name, `minimal`) && !contains(Name, `nat`) && !contains(Name, `ecs-optimized`) && !contains(Name, `beta`)].[ImageId, ImageLocation]' |\
2727
grep "\"" |\
2828
sed -e 's/^[ ]*\(.*\)[ ]*$/\1/' -e '/\"$/s/$/%/' |\
2929
tr "\n" "@" |\

src/test/resources/gremlin-server-service.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# 2b) If you're running Ubuntu: update-rc.d gremlin-server defaults
6969
#
7070
# You have to SET the Gremlin Server installation directory here:
71-
SVR="/usr/local/packages/dynamodb-janusgraph-storage-backend-1.2.0"
71+
SVR="/usr/local/packages/dynamodb-janusgraph-storage-backend-1.3.0"
7272
SVR_LOG="/var/log/gremlin-server"
7373
# Specify the user to run Gremlin Server as:
7474
SVR_USER="ec2-user"

src/test/resources/install-gremlin-server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mvn -q -T 1C install -Dmaven.test.skip=true -DskipTests=true $MVN_OPT_PARAMS
5555
# |
5656
# -pom.xml
5757
# -server - WORKDIR
58-
# |-janusgraph-0.2.0-hadoop2 - JANUSGRAPH_VANILLA_SERVER_DIRNAME
58+
# |-janusgraph-0.2.1-hadoop2 - JANUSGRAPH_VANILLA_SERVER_DIRNAME
5959
# |-dynamodb-janusgraph-storage-backend-X.Y.Z - JANUSGRAPH_DYNAMODB_SERVER_DIRNAME
6060
# |-dynamodb-janusgraph-storage-backend-X.Y.Z.zip - JANUSGRAPH_DYNAMODB_SERVER_ZIP
6161
# |
@@ -98,7 +98,7 @@ mvn test -q -Pdownload-janusgraph-server-zip $MVN_OPT_PARAMS > /dev/null 2>&1
9898

9999
#verify
100100
pushd target
101-
wget https://github.com/JanusGraph/janusgraph/releases/download/v0.2.0/KEYS
101+
wget https://github.com/JanusGraph/janusgraph/releases/download/v0.2.1/KEYS
102102
popd
103103
gpg --import target/KEYS
104104
gpg --verify src/test/resources/${JANUSGRAPH_VANILLA_SERVER_ZIP}.asc server/${JANUSGRAPH_VANILLA_SERVER_ZIP}

src/test/resources/janusgraph-0.2.0-hadoop2.zip.asc

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-----BEGIN PGP SIGNATURE-----
2+
Version: GnuPG v1
3+
4+
iQIcBAABCgAGBQJbRBwgAAoJEGa4X/FBgCuo2g0P/22eRdKbB7WmcaobiS5YGeSp
5+
RMlvJoOpflJvJ5elpm/MjJfDj0Il1wDCmmE24BuPQX1kzk/crjIb+XC4RB8P3K6I
6+
j0xOrO+eztQ4/W+wOlqzV1bAED6JqY5hZWgkMRyQumB9155p3UCwO126JV3UpJDz
7+
Vtbn1R8mjIxVZxpP75EBfDiqQG4Xjc+y/1tsBaJaHdAwkNLXxcb4qWji4pYUF3mb
8+
AvfEB9xZlJ8T/e9u6PY4NhlsGE54YuPFDIx2t3b6DUW7dcg3V1411aA13NaYrH6N
9+
Yn3QatjwQ/Rzb4n/asojuzmfjMm2BLnWHgX9IP+Mjhcbce4+5IbRJhoe446VPFiI
10+
YLDpxWDlY3aYopTk0fTDaGClcDlUZtXeCSNN8OnGz0x97af8jragxyNG9N6jxNYt
11+
H8bHNM6kQrJvTj6YD4WXfyHlXLokb+BlVvMAYBMdzQ3JIp7eX4WXFdueEcoo1zWS
12+
7nD5lN5cDSxW/M9QAmRtmQy8AzDFEHPJQM4K3XY4/B18FyyehuMU9sklMHmGOmRm
13+
hgx99KjU5ApMZxUBlDqat56eYBanLScUen4agHV17PHwJ73Xb765uvLFWqi0BUe2
14+
5K9F+xI6n9UEAx7/sNTQJgJQJ73WguK9+4zf0pcXeU4oACLUyOmIB7AuW5EuXf5e
15+
02U5gcOFHUlxruqyTLUF
16+
=VvSg
17+
-----END PGP SIGNATURE-----

0 commit comments

Comments
 (0)