This repository has been archived by the owner on Jan 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrun_validation.sh.template
57 lines (49 loc) · 1.79 KB
/
run_validation.sh.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#
# A template for LDBC validation script
#
# Usage: Copy this template, modify the copied one to fill out information needed
# change its permission (chmod +x [filename]) and run it.
#
# Note: This script should be run by AgensGraph's superuser
# because it will create a temp database (agensgraph_ldbc_validation)
# Modify this variables
PORT=
USER=
DATAPATH=`pwd`/validation_set/social_network/num_date
echo " ========================================= "
echo " AgensGraph LDBC validation running script "
echo " ========================================= "
echo
if [ -z "$PORT" ] || [ -z "$USER" ]; then
echo "[ERROR] Fill out the empty variables (PORT, USER)."
exit 1
fi
if [ ! -d "validation_set" ];
then
echo "=== Downloading validation set... "
echo
wget https://github.com/ldbc/ldbc_snb_interactive_validation/raw/master/neo4j/neo4j--validation_set.tar.gz
echo "=== Extract validation set into validation_set directory... "
echo
mkdir validation_set
tar zxf neo4j--validation_set.tar.gz -C validation_set
fi
dropdb -p $PORT agensgraph_ldbc_validation
createdb -p $PORT --lc-collate='C' --template=template0 agensgraph_ldbc_validation
cat > validation.conf <<EOF
DBNAME=agensgraph_ldbc_validation
PORT=$PORT
USER=$USER
DATAPATH=$DATAPATH
EOF
load_queries/load.sh validation.conf
rm -f validation.conf
java -cp target/classes/jeeves-0.3-SNAPSHOT.jar:target/classes/agensgraph-jdbc-0.9.0-SNAPSHOT.jar:target/classes com.ldbc.driver.Client \
-P validation.properties \
-p dbname agensgraph_ldbc_validation \
-p port $PORT \
-p user $USER \
-p validate_database validation_set/validation_params.csv \
-p ldbc.snb.interactive.parameters_dir validation_set/substitution_parameters \
-p ldbc.snb.interactive.updates_dir validation_set/social_network 2>ldbc_validation_err.log