[jira] [Resolved] (JENA-1616) TDB2 Loader: print progress of the overall load

2018-10-12 Thread Andy Seaborne (JIRA)


 [ 
https://issues.apache.org/jira/browse/JENA-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne resolved JENA-1616.
-
   Resolution: Fixed
 Assignee: Andy Seaborne
Fix Version/s: Jena 3.10.0

Done with 
https://github.com/apache/jena/commit/6e2a7e6c0b12ccfea040626955dbfc796810dc0f

> TDB2 Loader: print progress of the overall load
> ---
>
> Key: JENA-1616
> URL: https://issues.apache.org/jira/browse/JENA-1616
> Project: Apache Jena
>  Issue Type: Improvement
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Minor
> Fix For: Jena 3.10.0
>
>
> Some of the logging output is per file; It would be better if logged counts 
> were for the whole load, not per file.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (JENA-1618) Configuration for a TDB2 ,Reasoner and external content failed.

2018-10-12 Thread Andy Seaborne (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648548#comment-16648548
 ] 

Andy Seaborne commented on JENA-1618:
-

This part:
{noformat}
 ja:baseModel <#tdb_storage> ;
{noformat}

The base model is a Model so the code goes looking for a ja:Model.

It finds 
{noformat}
<#tdb_storage> rdf:type tdb2:DatasetTDB2 ;
{noformat}
which is not a ja:Model 

So you get  
" which has as possibilities: ja:Model tdb2:DatasetTDB2."

ja:baseModel needs a model (graph).

To get a specific graph from TDB2, add a description with type 
{{tdb2:GraphTDB2}}

{noformat}
 ja:baseModel <#tdb_graph> ;

<#tdb_graph> rdf:type tdb2:GraphTDB2 ;
# Default graph
tdb2:dataset <#tdb_storage> ;
.
<#tdb_storage> ...
{noformat}
or
{noformat}
<#tdb_graph> rdf:type tdb2:GraphTDB2 ;
# Named graph
tdb2:dataset <#tdb_storage> ;
tdb2:graphName "http://example.com/graph; ;
.
<#tdb_storage> ...
{noformat}


> Configuration for a TDB2 ,Reasoner and external content failed.
> ---
>
> Key: JENA-1618
> URL: https://issues.apache.org/jira/browse/JENA-1618
> Project: Apache Jena
>  Issue Type: Question
>  Components: Fuseki, Reasoners, TDB2
>Affects Versions: Jena 3.9.0
> Environment: Jena fuseki 3.9
> Mac OS El Capitan 
>Reporter: Jesus Herrera
>Priority: Major
>
> Hello everyone,
> I'm barely new to jena fuseki and I'm trying to configurate a config file 
> which use a TDB2 storage, OWL reasoner and an external content (my ontology).
> This is my configuration file:
> {noformat}
> # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
> PREFIX : <#>
> PREFIX fuseki: 
> PREFIX rdf: 
> PREFIX rdfs: 
> PREFIX tdb2: 
> PREFIX ja: 
> ## ---
> ## Updatable TDB dataset with all services enabled.
> <#service_tdb_all> rdf:type fuseki:Service ;
>  rdfs:label "TDB2 elmenu" ;
>  fuseki:name "elmenu" ;
>  fuseki:serviceQuery "query" ;
>  fuseki:serviceQuery "sparql" ;
>  fuseki:serviceUpdate "update" ;
>  fuseki:serviceUpload "upload" ;
>  fuseki:serviceReadWriteGraphStore "data" ;
>  # A separate read-only graph store endpoint:
>  fuseki:serviceReadGraphStore "get" ;
>  fuseki:dataset <#tdb_dataset_readwrite> ;
>  
>  .
> <#tdb_dataset_readwrite> a ja:RDFDataset;
>  ja:defaultGraph :modelInf;
>  .
> :modelInf a ja:InfModel;
>  ja:content [ja:externalContent 
>  ] ;
>  ja:reasoner [ja:reasonerURL ] 
> ;
>  ja:baseModel <#tdb_storage> ;
>  .
> <#tdb_storage> rdf:type tdb2:DatasetTDB2 ;
>  tdb2:location 
> "/Users/uppersky03/Documents/Momentum/fuseki-run/databases/elmenu" ;
>  ##ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "3000" ] ;
>  tdb2:unionDefaultGraph true ;
>  .
> {noformat}
>  
> And the Error I get is this:
> {noformat}
> [2018-10-10 11:50:04] Server ERROR Exception in initialization: cannot find a 
> most specific type for :tdb_storage, which has as possibilities: ja:Model 
> tdb2:DatasetTDB2.
> [2018-10-10 11:50:04] WebAppContext WARN Failed startup of context 
> o.e.j.w.WebAppContext@d4602a\{Apache Jena Fuseki 
> Server,/,file:///Users/uppersky03/Documents/Momentum/apache-jena-fuseki-3.9.0/webapp/,UNAVAILABLE}
> org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot 
> find a most specific type for :tdb_storage, which has as possibilities: 
> ja:Model tdb2:DatasetTDB2.
>  doing:
>  root: 
> file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#modelInf
>  with type: http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler 
> class: class org.apache.jena.assembler.assemblers.InfModelAssembler
>  root: 
> file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#tdb_dataset_readwrite
>  with type: http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler 
> class: class org.apache.jena.sparql.core.assembler.DatasetAssembler
> at 
> org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142)
>  at 
> org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
>  at 
> org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74)
>  at 
> org.apache.jena.assembler.assemblers.InfModelAssembler.getBase(InfModelAssembler.java:42)
>  at 
> org.apache.jena.assembler.assemblers.InfModelAssembler.openEmptyModel(InfModelAssembler.java:33)
>  at 
> org.apache.jena.assembler.assemblers.ModelAssembler.openModel(ModelAssembler.java:36)
>  at 
> 

[jira] [Updated] (JENA-1618) Configuration for a TDB2 ,Reasoner and external content failed.

2018-10-12 Thread Andy Seaborne (JIRA)


 [ 
https://issues.apache.org/jira/browse/JENA-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne updated JENA-1618:

Description: 
Hello everyone,

I'm barely new to jena fuseki and I'm trying to configurate a config file which 
use a TDB2 storage, OWL reasoner and an external content (my ontology).

This is my configuration file:
{noformat}
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

PREFIX : <#>
PREFIX fuseki: 
PREFIX rdf: 
PREFIX rdfs: 
PREFIX tdb2: 
PREFIX ja: 

## ---
## Updatable TDB dataset with all services enabled.

<#service_tdb_all> rdf:type fuseki:Service ;
 rdfs:label "TDB2 elmenu" ;
 fuseki:name "elmenu" ;
 fuseki:serviceQuery "query" ;
 fuseki:serviceQuery "sparql" ;
 fuseki:serviceUpdate "update" ;
 fuseki:serviceUpload "upload" ;
 fuseki:serviceReadWriteGraphStore "data" ;
 # A separate read-only graph store endpoint:
 fuseki:serviceReadGraphStore "get" ;
 fuseki:dataset <#tdb_dataset_readwrite> ;
 
 .
<#tdb_dataset_readwrite> a ja:RDFDataset;
 ja:defaultGraph :modelInf;
 .

:modelInf a ja:InfModel;
 ja:content [ja:externalContent 
 ] ;
 ja:reasoner [ja:reasonerURL ] ;
 ja:baseModel <#tdb_storage> ;
 .

<#tdb_storage> rdf:type tdb2:DatasetTDB2 ;
 tdb2:location 
"/Users/uppersky03/Documents/Momentum/fuseki-run/databases/elmenu" ;
 ##ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "3000" ] ;
 tdb2:unionDefaultGraph true ;
 .
{noformat}
 

And the Error I get is this:
{noformat}
[2018-10-10 11:50:04] Server ERROR Exception in initialization: cannot find a 
most specific type for :tdb_storage, which has as possibilities: ja:Model 
tdb2:DatasetTDB2.
[2018-10-10 11:50:04] WebAppContext WARN Failed startup of context 
o.e.j.w.WebAppContext@d4602a\{Apache Jena Fuseki 
Server,/,file:///Users/uppersky03/Documents/Momentum/apache-jena-fuseki-3.9.0/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot 
find a most specific type for :tdb_storage, which has as possibilities: 
ja:Model tdb2:DatasetTDB2.
 doing:
 root: 
file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#modelInf
 with type: http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: 
class org.apache.jena.assembler.assemblers.InfModelAssembler
 root: 
file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#tdb_dataset_readwrite
 with type: http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler 
class: class org.apache.jena.sparql.core.assembler.DatasetAssembler

at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74)
 at 
org.apache.jena.assembler.assemblers.InfModelAssembler.getBase(InfModelAssembler.java:42)
 at 
org.apache.jena.assembler.assemblers.InfModelAssembler.openEmptyModel(InfModelAssembler.java:33)
 at 
org.apache.jena.assembler.assemblers.ModelAssembler.openModel(ModelAssembler.java:36)
 at 
org.apache.jena.assembler.assemblers.ModelAssembler.open(ModelAssembler.java:43)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup.openModel(AssemblerGroup.java:47)
 at 
org.apache.jena.sparql.core.assembler.DatasetAssembler.createDataset(DatasetAssembler.java:56)
 at 
org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
 at org.apache.jena.fuseki.build.FusekiConfig.getDataset(FusekiConfig.java:272)
 at 

[jira] [Updated] (JENA-1618) Configuration for a TDB2 ,Reasoner and external content failed.

2018-10-12 Thread Andy Seaborne (JIRA)


 [ 
https://issues.apache.org/jira/browse/JENA-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne updated JENA-1618:

Description: 
Hello everyone,

I'm barely new to jena fuseki and I'm trying to configurate a config file which 
use a TDB2 storage, OWL reasoner and an external content (my ontology).

This is my configuration file:
{noformat}
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0

PREFIX : <#>
PREFIX fuseki: 
PREFIX rdf: 
PREFIX rdfs: 
PREFIX tdb2: 
PREFIX ja: 

## ---
## Updatable TDB dataset with all services enabled.

<#service_tdb_all> rdf:type fuseki:Service ;
 rdfs:label "TDB2 elmenu" ;
 fuseki:name "elmenu" ;
 fuseki:serviceQuery "query" ;
 fuseki:serviceQuery "sparql" ;
 fuseki:serviceUpdate "update" ;
 fuseki:serviceUpload "upload" ;
 fuseki:serviceReadWriteGraphStore "data" ;
 # A separate read-only graph store endpoint:
 fuseki:serviceReadGraphStore "get" ;
 fuseki:dataset <#tdb_dataset_readwrite> ;
 
 .
<#tdb_dataset_readwrite> a ja:RDFDataset;
 ja:defaultGraph :modelInf;
 .

:modelInf a ja:InfModel;
 ja:content [ja:externalContent 
 ] ;
 ja:reasoner [ja:reasonerURL ] ;
 ja:baseModel <#tdb_storage> ;
 .

<#tdb_storage> rdf:type tdb2:DatasetTDB2 ;
 tdb2:location 
"/Users/uppersky03/Documents/Momentum/fuseki-run/databases/elmenu" ;
 ##ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "3000" ] ;
 tdb2:unionDefaultGraph true ;
 .
{noformat}
 

And the Error I get is this:

[2018-10-10 11:50:04] Server ERROR Exception in initialization: cannot find a 
most specific type for :tdb_storage, which has as possibilities: ja:Model 
tdb2:DatasetTDB2.
[2018-10-10 11:50:04] WebAppContext WARN Failed startup of context 
o.e.j.w.WebAppContext@d4602a\{Apache Jena Fuseki 
Server,/,file:///Users/uppersky03/Documents/Momentum/apache-jena-fuseki-3.9.0/webapp/,UNAVAILABLE}
org.apache.jena.assembler.exceptions.AmbiguousSpecificTypeException: cannot 
find a most specific type for :tdb_storage, which has as possibilities: 
ja:Model tdb2:DatasetTDB2.
 doing:
 root: 
file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#modelInf
 with type: http://jena.hpl.hp.com/2005/11/Assembler#InfModel assembler class: 
class org.apache.jena.assembler.assemblers.InfModelAssembler
 root: 
file:///Users/uppersky03/Documents/Momentum/fuseki-run/configuration/config.ttl#tdb_dataset_readwrite
 with type: http://jena.hpl.hp.com/2005/11/Assembler#RDFDataset assembler 
class: class org.apache.jena.sparql.core.assembler.DatasetAssembler

at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:142)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.openModel(AssemblerBase.java:74)
 at 
org.apache.jena.assembler.assemblers.InfModelAssembler.getBase(InfModelAssembler.java:42)
 at 
org.apache.jena.assembler.assemblers.InfModelAssembler.openEmptyModel(InfModelAssembler.java:33)
 at 
org.apache.jena.assembler.assemblers.ModelAssembler.openModel(ModelAssembler.java:36)
 at 
org.apache.jena.assembler.assemblers.ModelAssembler.open(ModelAssembler.java:43)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup.openModel(AssemblerGroup.java:47)
 at 
org.apache.jena.sparql.core.assembler.DatasetAssembler.createDataset(DatasetAssembler.java:56)
 at 
org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
 at 
org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
 at 
org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
 at org.apache.jena.fuseki.build.FusekiConfig.getDataset(FusekiConfig.java:272)
 at 

Re: I know I have asked this before ....

2018-10-12 Thread Andy Seaborne

https://cwiki.apache.org/confluence/display/JENA/Commit+Workflow+for+Github-ASF

note the "--no-ff"

On 12/10/18 22:44, ajs6f wrote:

Well, what I like to do is make sure my local master branch is up-to-date (pull 
early, pull often!) then git rebase my feature branch over that up-to-date 
master (any conflict or confusion will show up at this point) and then go back 
to master and git merge my-branch. Then I can just git push master to Apache.

Does that makes sense? It looks something like:

[working in my branch]

git checkout master

git pull

git checkout my-branch

git rebase master

[fix any conflicts]

git checkout master

git merge my-branch

Now I usually do a complete mvn clean install, just to make sure, then

git push apache master

where for my setup, the remote name "apache" is the main repo at Apache that 
you give the URL for below.

ajs6f


On Oct 12, 2018, at 5:27 PM, Claude Warren  wrote:

OK.  I figured out it is  https://git-wip-us.apache.org/repos/asf/jena.git

but now I just need a refresher on our process.

On Fri, Oct 12, 2018 at 10:10 PM Claude Warren  wrote:


... but I'm getting old.

Where is the documentation for how to merge into the apache master git
repository?  Do just push merge the master locally and push back to
g...@github.com:apache/jena.git?

and then close the merge request by hand?  Or can I add closes !(merge
number) in the comments?

sucks getting old, but beats the alternative. ;)

--
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren




--
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren




Re: GeoSPARQL modules Was: Spatial distance in Fuseki

2018-10-12 Thread Andy Seaborne

Data loads, and I can query it!

public static void main(String...a) {
a = new String[] {"-d", "ds", "-rf", "geo.ttl", "-i", "true", 
"-dg", "true"};

io.github.galbiston.geosparql_fuseki.Main.main(a);

data is geosparql_test.rdf in TTL.

SELECT ?subj ?obj
WHERE{
?subj geo:sfContains ?obj
} ORDER by ?subj ?obj

Andy

On 09/10/18 14:57, Andy Seaborne wrote:

Hi Greg,

Excellent to see this!

I'll have ago at a shaded jar [*]

My first attempt shows an "interesting" issue : it only works with 
java8, not java 11 (well, this is Ubuntu, its actually Java 10.0.2 but 
it has modules):


Caused by: java.lang.ClassNotFoundException: 
javax.xml.bind.annotation.XmlType


This is nothing to do with geosparql-fuseki and something we all are 
going to see for a while.


There is a dependency is maven central.
     http://central.maven.org/maven2/javax/xml/bind/jaxb-api/


Then, or with java 8, I get me a likely looking warning:

Oct 09, 2018 2:46:35 PM 
org.apache.sis.referencing.factory.sql.EPSGFactory 

WARNING: The “SIS_DATA” environment variable is not set.

and it is time to read the README properly!

 Andy

[*]
https://gist.github.com/afs/1edc6aed00b56966c44b70a0d763f071

POM, because it is a hacked copy of another one (RDF Delta) - when it's 
working I can gradle-ize it




On 08/10/18 14:38, Greg Albiston wrote:

Hello,

Previously I made contact about an implementation of the GeoSPARQL 
standard for Jena.


There was a suggestion to make this a standalone project and look into 
switching across to Apache SIS to ease licencing. These have both been 
done.


The project is now published on GitHub at 
https://github.com/galbiston/geosparql-jena and has been released to 
Maven Central today.


There is also a project which uses Fuseki's embedded server with the 
GeoSPARQL features at https://github.com/galbiston/geosparql-fuseki.


I've tried to use the Shadow Plugin for Gradle to produce a user-jar 
based on https://jena.apache.org/documentation/notes/jena-repack.html 
but haven't been successful. If anyone can provide any advice or 
guidance on this then I'd appreciate it.


Also, being able to utilise the Fuseki GUI with the embedded server, 
since the application is providing data loading and function setup 
features, would also be useful to get guidance about.


If you have any feedback then please let me know.

Thanks,

Greg



[jira] [Commented] (JENA-1515) Values added to subQuery are stripped by QueryBuilder

2018-10-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648494#comment-16648494
 ] 

ASF GitHub Bot commented on JENA-1515:
--

Github user afs commented on a diff in the pull request:

https://github.com/apache/jena/pull/479#discussion_r224923241
  
--- Diff: 
jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java
 ---
@@ -103,17 +103,13 @@ public void visit(ElementBind el) {
@Override
public void visit(ElementData el) {
ElementData retval = new ElementData();
-   Iterator vars = el.getVars().iterator();
-   Iterator bindings = el.getRows().iterator();
-   while (vars.hasNext()) {
-   Var v = vars.next();
-   if (values.containsKey(v)) {
-   bindings.next(); // skip the binding
-   } else {
-   retval.add(v);
-   retval.add(rewrite(bindings.next()));
-   }
+   for (Var v : el.getVars()) {
+   retval.add(v);
}
+   for (Binding binding : el.getRows())
+   {
--- End diff --

Code layout. Some of same-line { , some next line {


> Values added to subQuery are stripped by QueryBuilder
> -
>
> Key: JENA-1515
> URL: https://issues.apache.org/jira/browse/JENA-1515
> Project: Apache Jena
>  Issue Type: Bug
>  Components: QueryBuilder
>Affects Versions: Jena 3.6.0, Jena 3.7.0
>Reporter: Claude Warren
>Assignee: Claude Warren
>Priority: Minor
>
> If values are added to a subQuery via the addValue methods the values are 
> stripped when the subquery is added to the outer query.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] jena pull request #479: JENA-1515 - Ensures values added to subQuery are not...

2018-10-12 Thread afs
Github user afs commented on a diff in the pull request:

https://github.com/apache/jena/pull/479#discussion_r224923241
  
--- Diff: 
jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java
 ---
@@ -103,17 +103,13 @@ public void visit(ElementBind el) {
@Override
public void visit(ElementData el) {
ElementData retval = new ElementData();
-   Iterator vars = el.getVars().iterator();
-   Iterator bindings = el.getRows().iterator();
-   while (vars.hasNext()) {
-   Var v = vars.next();
-   if (values.containsKey(v)) {
-   bindings.next(); // skip the binding
-   } else {
-   retval.add(v);
-   retval.add(rewrite(bindings.next()));
-   }
+   for (Var v : el.getVars()) {
+   retval.add(v);
}
+   for (Binding binding : el.getRows())
+   {
--- End diff --

Code layout. Some of same-line { , some next line {


---


Re: I know I have asked this before ....

2018-10-12 Thread ajs6f
Well, what I like to do is make sure my local master branch is up-to-date (pull 
early, pull often!) then git rebase my feature branch over that up-to-date 
master (any conflict or confusion will show up at this point) and then go back 
to master and git merge my-branch. Then I can just git push master to Apache.

Does that makes sense? It looks something like:

[working in my branch]

git checkout master

git pull

git checkout my-branch

git rebase master

[fix any conflicts]

git checkout master

git merge my-branch

Now I usually do a complete mvn clean install, just to make sure, then

git push apache master

where for my setup, the remote name "apache" is the main repo at Apache that 
you give the URL for below.

ajs6f

> On Oct 12, 2018, at 5:27 PM, Claude Warren  wrote:
> 
> OK.  I figured out it is  https://git-wip-us.apache.org/repos/asf/jena.git
> 
> but now I just need a refresher on our process.
> 
> On Fri, Oct 12, 2018 at 10:10 PM Claude Warren  wrote:
> 
>> ... but I'm getting old.
>> 
>> Where is the documentation for how to merge into the apache master git
>> repository?  Do just push merge the master locally and push back to
>> g...@github.com:apache/jena.git?
>> 
>> and then close the merge request by hand?  Or can I add closes !(merge
>> number) in the comments?
>> 
>> sucks getting old, but beats the alternative. ;)
>> 
>> --
>> I like: Like Like - The likeliest place on the web
>> 
>> LinkedIn: http://www.linkedin.com/in/claudewarren
>> 
> 
> 
> -- 
> I like: Like Like - The likeliest place on the web
> 
> LinkedIn: http://www.linkedin.com/in/claudewarren



[jira] [Commented] (JENA-1515) Values added to subQuery are stripped by QueryBuilder

2018-10-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648471#comment-16648471
 ] 

ASF GitHub Bot commented on JENA-1515:
--

Github user Claudenw commented on a diff in the pull request:

https://github.com/apache/jena/pull/479#discussion_r224920678
  
--- Diff: 
jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java
 ---
@@ -103,17 +103,13 @@ public void visit(ElementBind el) {
@Override
public void visit(ElementData el) {
ElementData retval = new ElementData();
-   Iterator vars = el.getVars().iterator();
-   Iterator bindings = el.getRows().iterator();
-   while (vars.hasNext()) {
-   Var v = vars.next();
-   if (values.containsKey(v)) {
-   bindings.next(); // skip the binding
-   } else {
-   retval.add(v);
-   retval.add(rewrite(bindings.next()));
-   }
+   for (Var v : el.getVars()) {
+   retval.add(v);
}
+   for (Binding binding : el.getRows())
+   {
--- End diff --

not sure what this comment means.  The style of the looping is different 
and has a different result.


> Values added to subQuery are stripped by QueryBuilder
> -
>
> Key: JENA-1515
> URL: https://issues.apache.org/jira/browse/JENA-1515
> Project: Apache Jena
>  Issue Type: Bug
>  Components: QueryBuilder
>Affects Versions: Jena 3.6.0, Jena 3.7.0
>Reporter: Claude Warren
>Assignee: Claude Warren
>Priority: Minor
>
> If values are added to a subQuery via the addValue methods the values are 
> stripped when the subquery is added to the outer query.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] jena pull request #479: JENA-1515 - Ensures values added to subQuery are not...

2018-10-12 Thread Claudenw
Github user Claudenw commented on a diff in the pull request:

https://github.com/apache/jena/pull/479#discussion_r224920678
  
--- Diff: 
jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java
 ---
@@ -103,17 +103,13 @@ public void visit(ElementBind el) {
@Override
public void visit(ElementData el) {
ElementData retval = new ElementData();
-   Iterator vars = el.getVars().iterator();
-   Iterator bindings = el.getRows().iterator();
-   while (vars.hasNext()) {
-   Var v = vars.next();
-   if (values.containsKey(v)) {
-   bindings.next(); // skip the binding
-   } else {
-   retval.add(v);
-   retval.add(rewrite(bindings.next()));
-   }
+   for (Var v : el.getVars()) {
+   retval.add(v);
}
+   for (Binding binding : el.getRows())
+   {
--- End diff --

not sure what this comment means.  The style of the looping is different 
and has a different result.


---


Re: I know I have asked this before ....

2018-10-12 Thread Claude Warren
OK.  I figured out it is  https://git-wip-us.apache.org/repos/asf/jena.git

but now I just need a refresher on our process.

On Fri, Oct 12, 2018 at 10:10 PM Claude Warren  wrote:

> ... but I'm getting old.
>
> Where is the documentation for how to merge into the apache master git
> repository?  Do just push merge the master locally and push back to
> g...@github.com:apache/jena.git?
>
> and then close the merge request by hand?  Or can I add closes !(merge
> number) in the comments?
>
> sucks getting old, but beats the alternative. ;)
>
> --
> I like: Like Like - The likeliest place on the web
> 
> LinkedIn: http://www.linkedin.com/in/claudewarren
>


-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


I know I have asked this before ....

2018-10-12 Thread Claude Warren
... but I'm getting old.

Where is the documentation for how to merge into the apache master git
repository?  Do just push merge the master locally and push back to
g...@github.com:apache/jena.git?

and then close the merge request by hand?  Or can I add closes !(merge
number) in the comments?

sucks getting old, but beats the alternative. ;)

-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren


[GitHub] jena pull request #480: JENA-1602 - added mechanism to add inserts or delete...

2018-10-12 Thread Claudenw
Github user Claudenw commented on a diff in the pull request:

https://github.com/apache/jena/pull/480#discussion_r224911183
  
--- Diff: jena-maven-tools/pom.xml ---
@@ -20,7 +20,6 @@
   4.0.0
   jena-maven-tools
   maven-plugin
-  3.7.0-SNAPSHOT
--- End diff --

Changes checked-in in error: reverted


---


[jira] [Commented] (JENA-1602) Update builder has no mechanism to add inserts or deletes based on model or triple collections

2018-10-12 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648429#comment-16648429
 ] 

ASF GitHub Bot commented on JENA-1602:
--

Github user Claudenw commented on a diff in the pull request:

https://github.com/apache/jena/pull/480#discussion_r224911048
  
--- Diff: jena-extras/jena-querybuilder/.gitignore ---
@@ -0,0 +1 @@
+/.project_old
--- End diff --

Checked in by error -- removed


> Update builder has no mechanism to add inserts or deletes based on model or 
> triple collections
> --
>
> Key: JENA-1602
> URL: https://issues.apache.org/jira/browse/JENA-1602
> Project: Apache Jena
>  Issue Type: Improvement
>  Components: QueryBuilder
>Reporter: Claude Warren
>Assignee: Claude Warren
>Priority: Minor
>
> Currently the query builder allows insert/delete of single triples, this 
> change would be  to accept a model as a collection of triples to 
> insert/delete.  In addition a collection of  could be 
> added/deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] jena pull request #480: JENA-1602 - added mechanism to add inserts or delete...

2018-10-12 Thread Claudenw
Github user Claudenw commented on a diff in the pull request:

https://github.com/apache/jena/pull/480#discussion_r224911048
  
--- Diff: jena-extras/jena-querybuilder/.gitignore ---
@@ -0,0 +1 @@
+/.project_old
--- End diff --

Checked in by error -- removed


---


[jira] [Commented] (JENA-1615) Compaction leaks file descriptors

2018-10-12 Thread Andy Seaborne (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647893#comment-16647893
 ] 

Andy Seaborne commented on JENA-1615:
-

Jena releases about every 3-4 months though it depends on people's availability 
(volunteers).

You can build the source code (-Pdev will all up to Fuseki2 and is faster) or 
try the development snapshots built daily (maven repo 
[https://repository.apache.org/snapshots).]

 

> Compaction leaks file descriptors
> -
>
> Key: JENA-1615
> URL: https://issues.apache.org/jira/browse/JENA-1615
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Core, TDB2
>Affects Versions: Jena 3.8.0
> Environment: I reproduced the issue on the following environments:
>  * OS / Java:
>  ** MacOS 10.13.5
> Java 1.8.0_161 (Oracle)
>  ** Debian 9.5
> Java 1.8.0_181 (OpenJDK)
>  * Jena version 3.8.0
>  * TDB2 mode: mapped
>Reporter: Damien Obrist
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 3.10.0
>
> Attachments: open_files_after_compaction_after_gc.png, 
> open_files_after_compaction_after_gc_with_fix.png, 
> open_files_after_compaction_before_gc.png, open_files_before_compaction.png
>
>
> h3. Context
> I'm using a TDB2 dataset in a long-running Scala application, in which the 
> dataset gets compacted regularly. After compactions, the application removes 
> the {{Data-}} folder of the previous generation. However, the 
> corresponding disk space isn't properly returned back to the OS, but is still 
> reported as being used by {{df}}. Indeed, {{lsof}} shows that the application 
> keeps open file descriptors that point to the old generation's files. Only 
> stopping / restarting the JVM frees the disk space for good.
> h3. Reproduction steps
>  * Connect to an existing TDB2 dataset
> {code}
> val dataset = TDB2Factory.connectDataset("sample"){code}
>  * Check open files
>   [^open_files_before_compaction.png]
>  * Compact the dataset
>   {code}DatabaseMgr.compact(dataset.asDatasetGraph){code}
>  * Check open files (before garbage collection)
>  [^open_files_after_compaction_before_gc.png]
>  * Check open files (after garbage collection)
>  [^open_files_after_compaction_after_gc.png]
> The last sceenshot shows that, even after garbage collection, there are still 
> open file descriptors pointing to the old generation {{Data-0001}}.
> h3. Impact
> Depending on how disk usage is being reported, this can be quite problematic. 
> In our case, we're running on an OpenShift infrastructure with limited 
> storage. After only a handful of compactions, the storage is considered full 
> and cannot be used anymore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (JENA-1615) Compaction leaks file descriptors

2018-10-12 Thread Damien Obrist (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647555#comment-16647555
 ] 

Damien Obrist commented on JENA-1615:
-

{quote}I'll merge the PR
{quote}
[~andy.seaborne] thanks a lot, that's great to hear! When is version 3.10.0 
scheduled to be released?

> Compaction leaks file descriptors
> -
>
> Key: JENA-1615
> URL: https://issues.apache.org/jira/browse/JENA-1615
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Core, TDB2
>Affects Versions: Jena 3.8.0
> Environment: I reproduced the issue on the following environments:
>  * OS / Java:
>  ** MacOS 10.13.5
> Java 1.8.0_161 (Oracle)
>  ** Debian 9.5
> Java 1.8.0_181 (OpenJDK)
>  * Jena version 3.8.0
>  * TDB2 mode: mapped
>Reporter: Damien Obrist
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 3.10.0
>
> Attachments: open_files_after_compaction_after_gc.png, 
> open_files_after_compaction_after_gc_with_fix.png, 
> open_files_after_compaction_before_gc.png, open_files_before_compaction.png
>
>
> h3. Context
> I'm using a TDB2 dataset in a long-running Scala application, in which the 
> dataset gets compacted regularly. After compactions, the application removes 
> the {{Data-}} folder of the previous generation. However, the 
> corresponding disk space isn't properly returned back to the OS, but is still 
> reported as being used by {{df}}. Indeed, {{lsof}} shows that the application 
> keeps open file descriptors that point to the old generation's files. Only 
> stopping / restarting the JVM frees the disk space for good.
> h3. Reproduction steps
>  * Connect to an existing TDB2 dataset
> {code}
> val dataset = TDB2Factory.connectDataset("sample"){code}
>  * Check open files
>   [^open_files_before_compaction.png]
>  * Compact the dataset
>   {code}DatabaseMgr.compact(dataset.asDatasetGraph){code}
>  * Check open files (before garbage collection)
>  [^open_files_after_compaction_before_gc.png]
>  * Check open files (after garbage collection)
>  [^open_files_after_compaction_after_gc.png]
> The last sceenshot shows that, even after garbage collection, there are still 
> open file descriptors pointing to the old generation {{Data-0001}}.
> h3. Impact
> Depending on how disk usage is being reported, this can be quite problematic. 
> In our case, we're running on an OpenShift infrastructure with limited 
> storage. After only a handful of compactions, the storage is considered full 
> and cannot be used anymore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)