blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
898 stars 173 forks source link

Blazegraph 2.1.4 debian package - bug in configs and/or in /usr/bin/loadRestAPI.sh #54

Open dazza-codes opened 7 years ago

dazza-codes commented 7 years ago

Followed the instructions in the blazegraph-deb section to build and install 2.1.4 on Ubuntu 16.04.

Pertains to blazegraph-deb/src/deb/bin/loadRestAPI.sh

$ /usr/bin/loadRestAPI.sh  /data/rdf/
Loading with properties...
quiet=false
verbose=0
closure=false
durableQueues=true
#Needed for quads
#defaultGraph=
com.bigdata.rdf.store.DataLoader.flush=false
com.bigdata.rdf.store.DataLoader.bufferCapacity=100000
com.bigdata.rdf.store.DataLoader.queueCapacity=10
#Namespace to load
namespace=kb
#Files to load
fileOrDirs=/data/src/dlss/ld4l/ld4p_root/rdf/MarcRDF/

##
## ATT: this is the bug here:
##
#Property file (if creating a new namespace)
propertyFile=/etc/blazegraph/RWStore.properties/RWStore.properties

DATALOADER-SERVLET: kb
java.util.concurrent.ExecutionException: java.io.FileNotFoundException: /etc/blazegraph/RWStore.properties/RWStore.properties
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)

When the loadRestAPI.sh script sources the /etc/default/blazegraph it already gets the full path to the RWStore.properties file, i.e.

$ grep 'RWStore' /etc/default/blazegraph
NSS_PROPERTIES="${BLZG_CONF}"/RWStore.properties

$ grep -C1 'NSS_PROPERTIES' /usr/bin/loadRestAPI.sh 

[ -z "${NSS_PROPERTIES}" ] && NSS_PROPERTIES=/etc/blazegraph

export NSS_DATALOAD_PROPERTIES="${NSS_PROPERTIES}/RWStore.properties"
dazza-codes commented 7 years ago

A possible fix for this (sorry it's not a PR):

$ git diff
diff --git a/blazegraph-deb/src/deb/bin/loadRestAPI.sh b/blazegraph-deb/src/deb/bin/loadRestAPI.sh
index 2ee49ed..995103e 100755
--- a/blazegraph-deb/src/deb/bin/loadRestAPI.sh
+++ b/blazegraph-deb/src/deb/bin/loadRestAPI.sh
@@ -7,9 +7,7 @@ FILE_OR_DIR=$1

 LOAD_PROP_FILE=/tmp/$$.properties

-[ -z "${NSS_PROPERTIES}" ] && NSS_PROPERTIES=/etc/blazegraph
-
-export NSS_DATALOAD_PROPERTIES="${NSS_PROPERTIES}/RWStore.properties"
+[ -z "${NSS_PROPERTIES}" ] && NSS_PROPERTIES=/etc/blazegraph/RWStore.properties

 #Probably some unused properties below, but copied all to be safe.

@@ -28,7 +26,7 @@ namespace=kb
 #Files to load
 fileOrDirs=$1
 #Property file (if creating a new namespace)
-propertyFile=$NSS_DATALOAD_PROPERTIES
+propertyFile=$NSS_PROPERTIES
 EOT
dazza-codes commented 7 years ago

Looks like this is already fixed and a dup of #25.

dazza-codes commented 7 years ago

Actually, leaving this open only to address whether it should be patched in the 2.1.4 release also?

TomConlin commented 7 years ago

Confirming this bug is still in the download .deb mid May 2017