Even just some pointers as to where in the code it should close
TopLevelTripleMatchFrame would be helpful if getting it setup is a
barrier. (if it should close it) I don't know the rules codes well enough.
-------------------
The example on JENA-1719 after editing the <file:> and tdb2:location runs.
Files in /home/afs/DIR/
Load data:
cd DIR
tdb2.tdbloader --loc=graph data.nt
I run it in Eclipse with
public static void main(String[] argv) throws Exception {
FusekiMainCmd.main("--config=/home/afs/DIR/example.ttl");
}
My example.ttl below.
Many thanks
Andy
On 08/06/2019 12:22, Dave Reynolds wrote:
Hi Andy,
Sure, I'll try to take a look over the weekend if I can get a working
dev environment set up.
Dave
On 07/06/2019 13:46, Andy Seaborne wrote:
Dave,
I am hoping you can give me a some pointers so I can solve JENA-1719.
https://issues.apache.org/jira/browse/JENA-1719
Setup:
data in TDB2.
ontology in a memory model.
RDFSExptRuleReasoner
First query has a short limit:
select * where {?s a <http://example.com/ns/Person>} limit 1
This returns one answer.
The iterator (LPTopGoalIterator) over the inf graph does get closed.
Second query has a longer limit
select * where {?s a <http://example.com/ns/Person>} limit 1000
(If the long query is used first, the second query works)
Problem:
The second query is using an iterator created during the first query.
During the LIMIT 1 query:
TopLevelTripleMatchFrame constructor
TopLevelTripleMatchFrame constructor
TopLevelTripleMatchFrame constructor
TopLevelTripleMatchFrame constructor
TopLevelTripleMatchFrame constructor
closeIterator[?s, rdf:type, http://example.com/ns/Person] <-- The query
LPInterpreter.close[cpFrame:ConsumerChoicePointFrame]
LPInterpreter.close[cpFrame:null]
LPInterpreter.close[cpFrame:ConsumerChoicePointFrame]
LPInterpreter.close[cpFrame:null]
TopLevelTripleMatchFrame.close is not called - and the same is true
genrally during startup.
Thanks,
Andy
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
<#service> rdf:type fuseki:Service ;
rdfs:label "Fuseki service" ;
fuseki:name "example" ;
fuseki:serviceQuery "query" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#inf_dataset> ;
.
<#inf_dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model> .
<#model> rdf:type ja:InfModel ;
ja:reasoner <#reasoner> ;
ja:baseModel <#tdb_graph> .
<#reasoner> rdf:type ja:ReasonerFactory ;
ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner> ;
ja:schema <#ontology> .
<#ontology> rdf:type ja:MemoryModel ;
ja:content [ ja:externalContent <file:///home/afs/DIR/example.owl> ] .
<#tdb_graph> rdf:type tdb2:GraphTDB ;
tdb2:dataset <#tdb2_dataset> .
<#tdb2_dataset> rdf:type tdb2:DatasetTDB2 ;
tdb2:location "/home/afs/DIR/graph" .