|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +NABU='go run ../../cmd/nabu/main.go' |
| 4 | +CFG='../../xxx/iow/iow_dev_v4.yaml' |
| 5 | +BLAZE='http://coreos.lan:9090/blazegraph/namespace/iow/sparql' |
| 6 | +GRAPHDB='http://coreos.lan:7200/repositories/testing' |
| 7 | + |
| 8 | +echo "------- BLAZEGRAPH PROV" |
| 9 | +echo "---------- clear, bulk, prune " |
| 10 | +time { |
| 11 | +${NABU} clear --cfg ${CFG} --dangerous --endpoint ec_blazegraph |
| 12 | +${NABU} bulk --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 13 | +${NABU} prune --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 14 | +} |
| 15 | + |
| 16 | +curl -H 'Accept: application/sparql-results+json' ${BLAZE} --data-urlencode 'query=SELECT (COUNT(DISTINCT ?graph) AS ?namedGraphsCount)(COUNT(*) AS ?triplesCount)WHERE {GRAPH ?graph {?subject ?predicate ?object}}' | jq '.results.bindings[0] | { namedGraphsCount: .namedGraphsCount.value, triplesCount: .triplesCount.value }' input.json - |
| 17 | + |
| 18 | + |
| 19 | +echo "---------- clear, release, object, prune " |
| 20 | +time { |
| 21 | +${NABU} clear --cfg ${CFG} --dangerous --endpoint ec_blazegraph |
| 22 | +${NABU} release --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 23 | +${NABU} object --cfg ${CFG} graphs/latest/organizations.nq --endpoint ec_blazegraph |
| 24 | +${NABU} prune --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 25 | +} |
| 26 | + |
| 27 | +curl -H 'Accept: application/sparql-results+json' ${BLAZE} --data-urlencode 'query=SELECT (COUNT(DISTINCT ?graph) AS ?namedGraphsCount)(COUNT(*) AS ?triplesCount)WHERE {GRAPH ?graph {?subject ?predicate ?object}}' | jq '.results.bindings[0] | { namedGraphsCount: .namedGraphsCount.value, triplesCount: .triplesCount.value }' input.json - |
| 28 | + |
| 29 | + |
| 30 | +echo "---------- clear, prefix, prune " |
| 31 | +time { |
| 32 | +${NABU} clear --cfg ${CFG} --dangerous --endpoint ec_blazegraph |
| 33 | +${NABU} prefix --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 34 | +${NABU} prune --cfg ${CFG} --prefix orgs --endpoint ec_blazegraph |
| 35 | +} |
| 36 | + |
| 37 | +curl -H 'Accept: application/sparql-results+json' ${BLAZE} --data-urlencode 'query=SELECT (COUNT(DISTINCT ?graph) AS ?namedGraphsCount)(COUNT(*) AS ?triplesCount)WHERE {GRAPH ?graph {?subject ?predicate ?object}}' | jq '.results.bindings[0] | { namedGraphsCount: .namedGraphsCount.value, triplesCount: .triplesCount.value }' input.json - |
| 38 | + |
| 39 | + |
| 40 | + |
0 commit comments