[GitHub] incubator-rya issue #292: Rya 489

2018-04-19 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/292
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/736/



---


[GitHub] incubator-rya pull request #292: Rya 489

2018-04-19 Thread kchilton2
GitHub user kchilton2 opened a pull request:

https://github.com/apache/incubator-rya/pull/292

Rya 489

This is pretty much just a repackaging commit. I moved the generic accumulo 
test code to a new "rya.test.accumulo" project. I had to introduce some code 
for performing installation steps to one of the test classes.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kchilton2/incubator-rya RYA-489

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-rya/pull/292.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #292


commit 9f8dc746f9e610b6e895acaf39c36c6e96a11f4e
Author: kchilton2 
Date:   2018-04-17T04:20:13Z

RYA-486 Updated the project's version to 4.0.0-incubating-SNAPSHOT.

commit 46f582771e1dfe575522ca82e303a8ad4077f529
Author: Jorge Machado 
Date:   2017-10-18T09:32:39Z

RYA-405 Migration of OpenRDF Sesame libraries to RDF4J

Co-authored-by: eric.white 
Co-authored-by: Jorge Machado 

commit afd2b3ec91a28622a195cb1f1f45d5c6297d350d
Author: eric.white 
Date:   2018-04-19T18:28:51Z

RYA-405 PR Updates

commit 2e692c29f4b2fd30aae52ee863b4776aee9628d6
Author: kchilton2 
Date:   2018-04-19T19:18:38Z

RYA-489 Moved common Accumulo integration test code to the 
rya.test.accumulo project.




---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444945#comment-16444945
 ] 

ASF GitHub Bot commented on RYA-405:


Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/735/



> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya issue #291: RYA-405 Migration of OpenRDF Sesame libraries to R...

2018-04-19 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/735/



---


[jira] [Created] (RYA-490) The dao does not get flushed after a rya command is executed.

2018-04-19 Thread Andrew Smith (JIRA)
Andrew Smith created RYA-490:


 Summary: The dao does not get flushed after a rya command is 
executed.
 Key: RYA-490
 URL: https://issues.apache.org/jira/browse/RYA-490
 Project: Rya
  Issue Type: Improvement
Reporter: Andrew Smith
Assignee: Kevin Chilton


The dao is not flushed after performing RyaCommands.

This has been replicated through MongoLoadStatementsFile.java



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444740#comment-16444740
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182874363
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
+private static final ValueFactory VF = 
SimpleValueFactory.getInstance();
+
+/**
+ * Prepended to the start of constant var names.
+ */
+public static final String CONSTANT_PREFIX = "_const_";
+private static final String LEGACY_CONSTANT_PREFIX = "-const-";
+
+/**
+ * Prepended to the start of anonymous var names.
+ */
+public static final String ANONYMOUS_PREFIX = "_anon_";
+private static final String LEGACY_ANONYMOUS_PREFIX = "-anon-";
+
+/**
+ * Private constructor to prevent instantiation.
+ */
+private VarNameUtils() {
+}
+
+/**
+ * Prepends the constant prefix to the specified value.
+ * @param value the value to add the constant prefix to.
+ * @return the value with the constant prefix attached before it.
+ */
+public static String prependConstant(final String value) {
--- End diff --

Done


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444718#comment-16444718
 ] 

ASF GitHub Bot commented on RYA-405:


Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/734/



> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya issue #291: RYA-405 Migration of OpenRDF Sesame libraries to R...

2018-04-19 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/734/



---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444717#comment-16444717
 ] 

ASF GitHub Bot commented on RYA-405:


Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/733/



> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya issue #291: RYA-405 Migration of OpenRDF Sesame libraries to R...

2018-04-19 Thread asfgit
Github user asfgit commented on the issue:

https://github.com/apache/incubator-rya/pull/291
  

Refer to this link for build results (access rights to CI server needed): 

https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/733/



---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444651#comment-16444651
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182854497
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
--- End diff --

Yea, this was the biggest obstacle to get our stuff working with RDF4J.  
They changed the tags used to mark constant and anonymous var names ("-const-" 
to "_const_" and "-anon-" to "_anon_").  And our code had tons of checks for 
the old tags using hard-coded strings everywhere.  Now everything at least 
references this class so it won't be hard to see what calls its methods.  I 
tried to mimic the old functionality with this but maybe we can eventually 
deprecate if there's another way (I didn't see one in RDF4J that handled 
Strings).


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182854497
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
--- End diff --

Yea, this was the biggest obstacle to get our stuff working with RDF4J.  
They changed the tags used to mark constant and anonymous var names ("-const-" 
to "_const_" and "-anon-" to "_anon_").  And our code had tons of checks for 
the old tags using hard-coded strings everywhere.  Now everything at least 
references this class so it won't be hard to see what calls its methods.  I 
tried to mimic the old functionality with this but maybe we can eventually 
deprecate if there's another way (I didn't see one in RDF4J that handled 
Strings).


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444616#comment-16444616
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182849235
  
--- Diff: extras/vagrantExample/src/main/vagrant/Vagrantfile ---
@@ -52,8 +52,8 @@ Vagrant.configure(2) do |config|
 export ACCUMULO_VERSION=1.6.5
 ###export ACCUMULO_VERSION=1.7.1
 export HADOOP_VERSION=2.7.2
-export RYA_EXAMPLE_VERSION=3.2.10-SNAPSHOT
-export SESAME_VERSION=2.7.6
+export RYA_EXAMPLE_VERSION=3.2.13-SNAPSHOT
--- End diff --

Changed


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444618#comment-16444618
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182849348
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
 ---
@@ -19,31 +19,29 @@
  * under the License.
  */
 
-
 import java.io.Closeable;
 import java.io.Flushable;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configurable;
-import org.openrdf.model.URI;
-
 import org.apache.rya.api.domain.RyaStatement;
 import org.apache.rya.api.domain.RyaURI;
+import org.eclipse.rdf4j.model.IRI;
 
 public interface RyaSecondaryIndexer extends Closeable, Flushable, 
Configurable {
/**
 * initialize after setting configuration.
 */
-public void init();
+   public void init();
--- End diff --

Fixed


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444617#comment-16444617
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182849296
  
--- Diff: dao/accumulo.rya/pom.xml ---
@@ -43,25 +43,30 @@ under the License.
 
 
 
-org.openrdf.sesame
-sesame-rio-ntriples
+org.eclipse.rdf4j
+rdf4j-rio-ntriples
 
 
-org.openrdf.sesame
-sesame-rio-nquads
+org.eclipse.rdf4j
+rdf4j-rio-nquads
 
 
-org.openrdf.sesame
-sesame-queryalgebra-evaluation
+org.eclipse.rdf4j
+rdf4j-queryalgebra-evaluation
+
+
+org.eclipse.rdf4j
+rdf4j-sail-api
+${org.eclipse.rdf4j.version}
--- End diff --

Done


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182849348
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
 ---
@@ -19,31 +19,29 @@
  * under the License.
  */
 
-
 import java.io.Closeable;
 import java.io.Flushable;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configurable;
-import org.openrdf.model.URI;
-
 import org.apache.rya.api.domain.RyaStatement;
 import org.apache.rya.api.domain.RyaURI;
+import org.eclipse.rdf4j.model.IRI;
 
 public interface RyaSecondaryIndexer extends Closeable, Flushable, 
Configurable {
/**
 * initialize after setting configuration.
 */
-public void init();
+   public void init();
--- End diff --

Fixed


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182849296
  
--- Diff: dao/accumulo.rya/pom.xml ---
@@ -43,25 +43,30 @@ under the License.
 
 
 
-org.openrdf.sesame
-sesame-rio-ntriples
+org.eclipse.rdf4j
+rdf4j-rio-ntriples
 
 
-org.openrdf.sesame
-sesame-rio-nquads
+org.eclipse.rdf4j
+rdf4j-rio-nquads
 
 
-org.openrdf.sesame
-sesame-queryalgebra-evaluation
+org.eclipse.rdf4j
+rdf4j-queryalgebra-evaluation
+
+
+org.eclipse.rdf4j
+rdf4j-sail-api
+${org.eclipse.rdf4j.version}
--- End diff --

Done


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182849235
  
--- Diff: extras/vagrantExample/src/main/vagrant/Vagrantfile ---
@@ -52,8 +52,8 @@ Vagrant.configure(2) do |config|
 export ACCUMULO_VERSION=1.6.5
 ###export ACCUMULO_VERSION=1.7.1
 export HADOOP_VERSION=2.7.2
-export RYA_EXAMPLE_VERSION=3.2.10-SNAPSHOT
-export SESAME_VERSION=2.7.6
+export RYA_EXAMPLE_VERSION=3.2.13-SNAPSHOT
--- End diff --

Changed


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444615#comment-16444615
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182849095
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/ThreshholdPlanSelector.java
 ---
@@ -111,9 +110,9 @@ public double getCost(TupleExpr te, double indexWeight, 
double commonVarWeight,
 double dirProductScale;
 
 if(queryNodeCount > nodeCount) {
-dirProductScale = 1/((double)(queryNodeCount - nodeCount));
+dirProductScale = 1/ (queryNodeCount - nodeCount);
--- End diff --

nodeCount is a double so java forces the divisor here to be a double as 
well so there's no precision lost.  Casting it to a double would only be needed 
if queryNodeCount and nodeCount were both int's (or other less precise number 
types).


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182849095
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/ThreshholdPlanSelector.java
 ---
@@ -111,9 +110,9 @@ public double getCost(TupleExpr te, double indexWeight, 
double commonVarWeight,
 double dirProductScale;
 
 if(queryNodeCount > nodeCount) {
-dirProductScale = 1/((double)(queryNodeCount - nodeCount));
+dirProductScale = 1/ (queryNodeCount - nodeCount);
--- End diff --

nodeCount is a double so java forces the divisor here to be a double as 
well so there's no precision lost.  Casting it to a double would only be needed 
if queryNodeCount and nodeCount were both int's (or other less precise number 
types).


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444590#comment-16444590
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182846009
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/FilterFunctionOptimizer.java
 ---
@@ -157,18 +156,18 @@ private void buildQuery(final TupleExpr tupleExpr, 
final StatementPattern matchS
 tupleExpr.visit(fVisitor);
 final List results = Lists.newArrayList();
 for(int i = 0; i < fVisitor.func.size(); i++){
-results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, fVisitor.args.get(i)));
+results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, Arrays.stream(fVisitor.args.get(i)).toArray()));
--- End diff --

Got rid of a warning about not matching the varargs parameter type.


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182846009
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/FilterFunctionOptimizer.java
 ---
@@ -157,18 +156,18 @@ private void buildQuery(final TupleExpr tupleExpr, 
final StatementPattern matchS
 tupleExpr.visit(fVisitor);
 final List results = Lists.newArrayList();
 for(int i = 0; i < fVisitor.func.size(); i++){
-results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, fVisitor.args.get(i)));
+results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, Arrays.stream(fVisitor.args.get(i)).toArray()));
--- End diff --

Got rid of a warning about not matching the varargs parameter type.


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444579#comment-16444579
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182844645
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
  * URI that is just an Attribute on the subject vs. a URI that is another 
subject Node in the global graph. It does not
--- End diff --

Done.  I'll try to find more in javadocs.


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182844645
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
  * URI that is just an Attribute on the subject vs. a URI that is another 
subject Node in the global graph. It does not
--- End diff --

Done.  I'll try to find more in javadocs.


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16444577#comment-16444577
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182844330
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
--- End diff --

Done


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread ejwhite922
Github user ejwhite922 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182844330
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
--- End diff --

Done


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1676#comment-1676
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182601712
  
--- Diff: dao/accumulo.rya/pom.xml ---
@@ -43,25 +43,30 @@ under the License.
 
 
 
-org.openrdf.sesame
-sesame-rio-ntriples
+org.eclipse.rdf4j
+rdf4j-rio-ntriples
 
 
-org.openrdf.sesame
-sesame-rio-nquads
+org.eclipse.rdf4j
+rdf4j-rio-nquads
 
 
-org.openrdf.sesame
-sesame-queryalgebra-evaluation
+org.eclipse.rdf4j
+rdf4j-queryalgebra-evaluation
+
+
+org.eclipse.rdf4j
+rdf4j-sail-api
+${org.eclipse.rdf4j.version}
--- End diff --

Add to rya-project dependency management


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1672#comment-1672
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182596490
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
+private static final ValueFactory VF = 
SimpleValueFactory.getInstance();
+
+/**
+ * Prepended to the start of constant var names.
+ */
+public static final String CONSTANT_PREFIX = "_const_";
+private static final String LEGACY_CONSTANT_PREFIX = "-const-";
+
+/**
+ * Prepended to the start of anonymous var names.
+ */
+public static final String ANONYMOUS_PREFIX = "_anon_";
+private static final String LEGACY_ANONYMOUS_PREFIX = "-anon-";
+
+/**
+ * Private constructor to prevent instantiation.
+ */
+private VarNameUtils() {
+}
+
+/**
+ * Prepends the constant prefix to the specified value.
+ * @param value the value to add the constant prefix to.
+ * @return the value with the constant prefix attached before it.
+ */
+public static String prependConstant(final String value) {
--- End diff --

Params and return type are @ Nullable


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1674#comment-1674
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182602289
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/FilterFunctionOptimizer.java
 ---
@@ -157,18 +156,18 @@ private void buildQuery(final TupleExpr tupleExpr, 
final StatementPattern matchS
 tupleExpr.visit(fVisitor);
 final List results = Lists.newArrayList();
 for(int i = 0; i < fVisitor.func.size(); i++){
-results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, fVisitor.args.get(i)));
+results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, Arrays.stream(fVisitor.args.get(i)).toArray()));
--- End diff --

This is kind of a weird change.


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1668#comment-1668
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182596150
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
--- End diff --

"This typing of the [IRI] ..."


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182825471
  
--- Diff: extras/vagrantExample/src/main/vagrant/Vagrantfile ---
@@ -52,8 +52,8 @@ Vagrant.configure(2) do |config|
 export ACCUMULO_VERSION=1.6.5
 ###export ACCUMULO_VERSION=1.7.1
 export HADOOP_VERSION=2.7.2
-export RYA_EXAMPLE_VERSION=3.2.10-SNAPSHOT
-export SESAME_VERSION=2.7.6
+export RYA_EXAMPLE_VERSION=3.2.13-SNAPSHOT
--- End diff --

This will need to be 4.0.0. This commit should be after the version update 
commit.


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1671#comment-1671
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182596798
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
 ---
@@ -19,31 +19,29 @@
  * under the License.
  */
 
-
 import java.io.Closeable;
 import java.io.Flushable;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configurable;
-import org.openrdf.model.URI;
-
 import org.apache.rya.api.domain.RyaStatement;
 import org.apache.rya.api.domain.RyaURI;
+import org.eclipse.rdf4j.model.IRI;
 
 public interface RyaSecondaryIndexer extends Closeable, Flushable, 
Configurable {
/**
 * initialize after setting configuration.
 */
-public void init();
+   public void init();
--- End diff --

Tab


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1670#comment-1670
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182596172
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
  * URI that is just an Attribute on the subject vs. a URI that is another 
subject Node in the global graph. It does not
--- End diff --

IRI


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1673#comment-1673
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182602468
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/ThreshholdPlanSelector.java
 ---
@@ -111,9 +110,9 @@ public double getCost(TupleExpr te, double indexWeight, 
double commonVarWeight,
 double dirProductScale;
 
 if(queryNodeCount > nodeCount) {
-dirProductScale = 1/((double)(queryNodeCount - nodeCount));
+dirProductScale = 1/ (queryNodeCount - nodeCount);
--- End diff --

Are we sure about getting rid of the double casts here? We don't lose 
precision in the division?


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1675#comment-1675
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182825471
  
--- Diff: extras/vagrantExample/src/main/vagrant/Vagrantfile ---
@@ -52,8 +52,8 @@ Vagrant.configure(2) do |config|
 export ACCUMULO_VERSION=1.6.5
 ###export ACCUMULO_VERSION=1.7.1
 export HADOOP_VERSION=2.7.2
-export RYA_EXAMPLE_VERSION=3.2.10-SNAPSHOT
-export SESAME_VERSION=2.7.6
+export RYA_EXAMPLE_VERSION=3.2.13-SNAPSHOT
--- End diff --

This will need to be 4.0.0. This commit should be after the version update 
commit.


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182596150
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
--- End diff --

"This typing of the [IRI] ..."


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182596798
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
 ---
@@ -19,31 +19,29 @@
  * under the License.
  */
 
-
 import java.io.Closeable;
 import java.io.Flushable;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configurable;
-import org.openrdf.model.URI;
-
 import org.apache.rya.api.domain.RyaStatement;
 import org.apache.rya.api.domain.RyaURI;
+import org.eclipse.rdf4j.model.IRI;
 
 public interface RyaSecondaryIndexer extends Closeable, Flushable, 
Configurable {
/**
 * initialize after setting configuration.
 */
-public void init();
+   public void init();
--- End diff --

Tab


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182596437
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
--- End diff --

Us needing this class at all is kind of a smell. Maybe note that this is 
discouraged if there's any other way to figure out if your Var is constant or 
anonymous. I think there are methods that tell you that information.


---


[jira] [Commented] (RYA-405) Migrate from Sesame to rdf4j libs

2018-04-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1669#comment-1669
 ] 

ASF GitHub Bot commented on RYA-405:


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

https://github.com/apache/incubator-rya/pull/291#discussion_r182596437
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
--- End diff --

Us needing this class at all is kind of a smell. Maybe note that this is 
discouraged if there's any other way to figure out if your Var is constant or 
anonymous. I think there are methods that tell you that information.


> Migrate from  Sesame to rdf4j libs
> --
>
> Key: RYA-405
> URL: https://issues.apache.org/jira/browse/RYA-405
> Project: Rya
>  Issue Type: Improvement
>Affects Versions: 3.2.12
>Reporter: Jorge Machado
>Assignee: Eric White
>Priority: Major
> Fix For: 4.0.0
>
>
> I have migrated all the project to the newer libs from rdf4j instead of using 
> the old ones. 
> Can someone take a look ? 



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


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182596172
  
--- Diff: common/rya.api/src/main/java/org/apache/rya/api/domain/Node.java 
---
@@ -21,14 +21,14 @@
 
 
 
-import org.openrdf.model.impl.URIImpl;
+import org.eclipse.rdf4j.model.impl.SimpleIRI;
 
 /**
  * A Node is an expected node in the global graph. This typing of the URI 
allows us to dictate the difference between a
  * URI that is just an Attribute on the subject vs. a URI that is another 
subject Node in the global graph. It does not
--- End diff --

IRI


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182602468
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/IndexPlanValidator/ThreshholdPlanSelector.java
 ---
@@ -111,9 +110,9 @@ public double getCost(TupleExpr te, double indexWeight, 
double commonVarWeight,
 double dirProductScale;
 
 if(queryNodeCount > nodeCount) {
-dirProductScale = 1/((double)(queryNodeCount - nodeCount));
+dirProductScale = 1/ (queryNodeCount - nodeCount);
--- End diff --

Are we sure about getting rid of the double casts here? We don't lose 
precision in the division?


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182601712
  
--- Diff: dao/accumulo.rya/pom.xml ---
@@ -43,25 +43,30 @@ under the License.
 
 
 
-org.openrdf.sesame
-sesame-rio-ntriples
+org.eclipse.rdf4j
+rdf4j-rio-ntriples
 
 
-org.openrdf.sesame
-sesame-rio-nquads
+org.eclipse.rdf4j
+rdf4j-rio-nquads
 
 
-org.openrdf.sesame
-sesame-queryalgebra-evaluation
+org.eclipse.rdf4j
+rdf4j-queryalgebra-evaluation
+
+
+org.eclipse.rdf4j
+rdf4j-sail-api
+${org.eclipse.rdf4j.version}
--- End diff --

Add to rya-project dependency management


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182596490
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.api.domain;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.model.ValueFactory;
+import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
+import org.eclipse.rdf4j.query.algebra.Var;
+import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
+
+/**
+ * Utility methods and constants for RDF {@link Var} names.
+ */
+public final class VarNameUtils {
+private static final ValueFactory VF = 
SimpleValueFactory.getInstance();
+
+/**
+ * Prepended to the start of constant var names.
+ */
+public static final String CONSTANT_PREFIX = "_const_";
+private static final String LEGACY_CONSTANT_PREFIX = "-const-";
+
+/**
+ * Prepended to the start of anonymous var names.
+ */
+public static final String ANONYMOUS_PREFIX = "_anon_";
+private static final String LEGACY_ANONYMOUS_PREFIX = "-anon-";
+
+/**
+ * Private constructor to prevent instantiation.
+ */
+private VarNameUtils() {
+}
+
+/**
+ * Prepends the constant prefix to the specified value.
+ * @param value the value to add the constant prefix to.
+ * @return the value with the constant prefix attached before it.
+ */
+public static String prependConstant(final String value) {
--- End diff --

Params and return type are @ Nullable


---


[GitHub] incubator-rya pull request #291: RYA-405 Migration of OpenRDF Sesame librari...

2018-04-19 Thread kchilton2
Github user kchilton2 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/291#discussion_r182602289
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/FilterFunctionOptimizer.java
 ---
@@ -157,18 +156,18 @@ private void buildQuery(final TupleExpr tupleExpr, 
final StatementPattern matchS
 tupleExpr.visit(fVisitor);
 final List results = Lists.newArrayList();
 for(int i = 0; i < fVisitor.func.size(); i++){
-results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, fVisitor.args.get(i)));
+results.add(new IndexingExpr(fVisitor.func.get(i), 
matchStatement, Arrays.stream(fVisitor.args.get(i)).toArray()));
--- End diff --

This is kind of a weird change.


---