Skip to content

Commit db415c0

Browse files
authored
Merge pull request #188 from ldbc/sf1-test
Test SF1 in CI
2 parents 4928beb + cd500ac commit db415c0

File tree

12 files changed

+68
-6945
lines changed

12 files changed

+68
-6945
lines changed

.circleci/config.yml

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ workflows:
99

1010
jobs:
1111
test:
12-
resource_class: large
12+
resource_class: xlarge
1313
machine:
1414
image: ubuntu-2004:202008-01
1515
steps:
@@ -29,21 +29,21 @@ jobs:
2929
name: Build project
3030
command: ./build.sh
3131
- run:
32-
name: Load Cypher/Neo4j database (1st time)
32+
name: Tiny data set - Load Cypher/Neo4j database (1st time)
3333
command: |
3434
cd cypher
3535
. scripts/environment-variables-default.sh
3636
scripts/load-in-one-step.sh
3737
cd ..
3838
- run:
39-
name: Create validation parameters with Neo4j/Cypher project
39+
name: Tiny data set - Create validation parameters with Neo4j/Cypher project
4040
command: |
4141
cd cypher
4242
driver/create-validation-parameters.sh
43-
mv validation_params.csv validation_params_cypher.csv
43+
mv validation_params.csv validation_params_cypher_tiny.csv
4444
cd ..
4545
- run:
46-
name: Load PostgreSQL database (1st time)
46+
name: Tiny data set - Load PostgreSQL database (1st time)
4747
command: |
4848
cd postgres
4949
export POSTGRES_CSV_DIR=`pwd`/test-data/
@@ -52,29 +52,29 @@ jobs:
5252
scripts/load.sh
5353
cd ..
5454
- run:
55-
name: Create validation parameters with the PostgreSQL project
55+
name: Tiny data set - Create validation parameters with the PostgreSQL project
5656
command: |
5757
cd postgres
5858
driver/create-validation-parameters.sh
59-
mv validation_params.csv validation_params_postgres.csv
59+
mv validation_params.csv validation_params_postgres_tiny.csv
6060
cd ..
6161
- run:
62-
name: Load Cypher/Neo4j database (2nd time)
62+
name: Tiny data set - Load Cypher/Neo4j database (2nd time)
6363
command: |
6464
cd cypher
6565
. scripts/environment-variables-default.sh
6666
scripts/load-in-one-step.sh
6767
cd ..
6868
- run:
69-
name: Cross-validate the Neo4j/Cypher project based on the results from Postgres
69+
name: Tiny data set - Cross-validate the Neo4j/Cypher project based on the results from Postgres
7070
command: |
71-
mv postgres/validation_params_postgres.csv cypher/validation_params.csv
71+
mv postgres/validation_params_postgres_tiny.csv cypher/validation_params.csv
7272
cd cypher
7373
driver/validate.sh | tee validation-log.txt
7474
grep 'Validation Result: PASS' validation-log.txt
7575
cd ..
7676
- run:
77-
name: Load PostgreSQL database (2nd time)
77+
name: Tiny data set - Load PostgreSQL database (2nd time)
7878
command: |
7979
cd postgres
8080
export POSTGRES_CSV_DIR=`pwd`/test-data/
@@ -83,9 +83,49 @@ jobs:
8383
scripts/load.sh
8484
cd ..
8585
- run:
86-
name: Cross-validate the Postgres project based on the results from Neo4j/Cypher
86+
name: Tiny data set - Cross-validate the Postgres project based on the results from Neo4j/Cypher
8787
command: |
88-
mv cypher/validation_params_cypher.csv postgres/validation_params.csv
88+
mv cypher/validation_params_cypher_tiny.csv postgres/validation_params.csv
89+
cd postgres
90+
driver/validate.sh | tee validation-log.txt
91+
grep 'Validation Result: PASS' validation-log.txt
92+
cd ..
93+
- run:
94+
name: Download SF1 data set
95+
command: |
96+
wget https://surfdrive.surf.nl/files/index.php/s/Ar7kacLw3LVzQaf/download --quiet --output-document=sf1.zip
97+
unzip sf1.zip
98+
# substitution parameters and updateStreams for Neo4j/Cypher
99+
cp ./sf1/substitution_parameters/* ./cypher/test-data/substitution_parameters/
100+
cp ./sf1/social_network-csv_composite/updateStream* ./cypher/test-data/update_streams/
101+
- run:
102+
name: SF1 data set - Load Cypher/Neo4j database
103+
command: |
104+
cd cypher
105+
. scripts/environment-variables-default.sh
106+
export NEO4J_VANILLA_CSV_DIR=`pwd`/../sf1/social_network-csv_composite
107+
scripts/load-in-one-step.sh
108+
cd ..
109+
- run:
110+
name: SF1 data set - Create validation parameters with the Neo4j/Cypher
111+
command: |
112+
cd cypher
113+
driver/create-validation-parameters.sh
114+
mv validation_params.csv validation_params_cypher_sf1.csv
115+
cd ..
116+
- run:
117+
name: SF1 data set - Load PostgreSQL database
118+
command: |
119+
cd postgres
120+
export POSTGRES_CSV_DIR=`pwd`/../sf1/social_network-csv_merge_foreign
121+
scripts/start.sh
122+
scripts/create-db.sh
123+
scripts/load.sh
124+
cd ..
125+
- run:
126+
name: SF1 data set - Cross-validate the Postgres project based on the results from Neo4j/Cypher
127+
command: |
128+
mv cypher/validation_params_cypher_sf1.csv postgres/validation_params.csv
89129
cd postgres
90130
driver/validate.sh | tee validation-log.txt
91131
grep 'Validation Result: PASS' validation-log.txt

common/src/main/java/com/ldbc/impls/workloads/ldbc/snb/converter/Converter.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
public class Converter {
1313

1414
final static String DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'";
15+
final static String DATE_FORMAT = "yyyy-MM-dd";
1516

1617
public String convertDateTime(Date date) {
1718
final SimpleDateFormat sdf = new SimpleDateFormat(DATETIME_FORMAT);
@@ -20,7 +21,9 @@ public String convertDateTime(Date date) {
2021
}
2122

2223
public String convertDate(Date date) {
23-
return convertDateTime(date);
24+
final SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
25+
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
26+
return "'" + sdf.format(date) + "'";
2427
}
2528

2629
/**
@@ -85,10 +88,6 @@ public String convertOrganisations(List<LdbcUpdate1AddPerson.Organization> value
8588
return res;
8689
}
8790

88-
public String convertBlacklist(List<String> words) {
89-
return convertStringList(words);
90-
}
91-
9291
/**
9392
* Some implementations, e.g. the (deprecated) SPARQL one, will not work with a simple toString and require some tinkering,
9493
* e.g. padding the id with '0' characters.

cypher/driver/benchmark.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ endpoint=bolt://localhost:7687
22
user=neo4j
33
password=admin
44
queryDir=queries/
5+
56
printQueryNames=false
67
printQueryStrings=false
78
printQueryResults=false

cypher/driver/create-validation-parameters-sf10.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ endpoint=bolt://localhost:7687
22
user=neo4j
33
password=admin
44
queryDir=queries/
5+
56
printQueryNames=true
6-
printQueryStrings=true
7+
printQueryStrings=false
78
printQueryResults=false
89

910
status=1

cypher/driver/create-validation-parameters.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ endpoint=bolt://localhost:7687
22
user=neo4j
33
password=admin
44
queryDir=queries/
5+
56
printQueryNames=true
67
printQueryStrings=false
78
printQueryResults=false

cypher/queries/interactive-update-1.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CREATE (p:Person {
44
firstName: $personFirstName,
55
lastName: $personLastName,
66
gender: $gender,
7-
birthday: datetime($birthday),
7+
birthday: date($birthday),
88
creationDate: datetime($creationDate),
99
locationIP: $locationIP,
1010
browserUsed: $browserUsed,

postgres/driver/benchmark.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ password=mysecretpassword
44
databaseName=ldbcsnb
55
jdbcDriver=org.postgresql.ds.PGPoolingDataSource
66
queryDir=queries
7+
78
printQueryNames=false
89
printQueryStrings=false
910
printQueryResults=false

postgres/driver/create-validation-parameters.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ password=mysecretpassword
44
databaseName=ldbcsnb
55
jdbcDriver=org.postgresql.ds.PGPoolingDataSource
66
queryDir=queries
7+
78
printQueryNames=true
89
printQueryStrings=false
910
printQueryResults=false

postgres/src/main/java/com/ldbc/impls/workloads/ldbc/snb/postgres/converter/PostgresConverter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public String convertDateTime(Date date) {
2323
return "'" + sdf.format(date) + "'::timestamp";
2424
}
2525

26+
public String convertDate(Date date) {
27+
return super.convertDate(date) + "::date";
28+
}
29+
2630
@Override
2731
public String convertString(String value) {
2832
return "'" + value.replace("'", "''") + "'";

postgres/test-data/updateStream.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)