-
Notifications
You must be signed in to change notification settings - Fork 2
Fuseki
csarven edited this page Jan 31, 2012
·
3 revisions
VoID + SD: http://data-gov.ie/void.ttl
The TDB assembler file mentioned below sets the store location. For staging, it is located in /usr/lib/fuseki/DBStaging/
http://staging.data-gov.ie/sparql
Note that we start fuseki in read and write mode:
/usr/lib/fuseki/fuseki-server.datagovie.staging --verbose --update --port=3131 --desc /usr/lib/fuseki/tdb2.datagovie.staging.ttl /dataset
/usr/lib/fuseki/./s-put --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/{name} file.rdfNote: Put clears and deletes existing graph and its data.
/usr/lib/fuseki/./s-post --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/{name} file.rdfNote: Post will add triples to existing graph. If graph doesn't exist, it will create one.
URL: https://github.com/csarven/graphpusher Examples:
ruby GraphPusher.rb http://example.org/void.ttl --assembler=/usr/lib/fuseki/tdb2.datagovie.staging.ttl ruby GraphPusher.rb http://example.org/void.ttl --dataset=http://localhost:3131/dataset/data
(See README for more information)
Example:
java tdb.tdbloader --desc=/usr/lib/fuseki/tdb2.datagovie.staging.ttl --graph=http://purl.org/linked-data/cube cube.ttl
- Run the following bash script from a directory with several RDF files which needs to go into the same graph.
#PRWODI=$PWD #BN=$BASENAME pwdrelative=${PWD##*/} for file in *.ttl; do # filename=$(basename $file); # extension=${filename##*.}; # graph=${filename%.*}; /usr/lib/fuseki/./s-post --verbose http://localhost:3131/dataset/data http://data-gov.ie/graph/$pwdrelative $file; done;
Note that we start it in read only mode:
/usr/lib/fuseki/fuseki-server --verbose --desc /usr/lib/fuseki/tdb2.dataset.ttl /dataset
- Review data in Staging.
- Go to step 1.
NOTE: I have a graphpusher-hotswap.rb in works. I'll put that here when ready for production use. -Sarven
We do DB hot-swap:
- Stop the production Fuseki service
- Just caution: Make sure staging store exists (i.e., /usr/lib/fuseki/DBStaging ) and contains data. Double check staging.
- Back up existing production store: mv DB DB.bak
- Stop the staging Fuseki service (in case something funky updates are happening)
- Make a copy of the staging store for production: cp -R DBStaging DB
- Start production Fuseki service
- Start staging Fuseki service
- Check around http://data-gov.ie/ to make sure things are running okay.
- Go outside and get some sun