[GitHub] incubator-rya issue #186: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/296/Build
 result: ABORTED[...truncated 5.76 MB...][INFO] --- 
apache-rat-plugin:0.11:check (check-licenses) @ rya.console ---[INFO] 51 
implicit excludes (use -debug for more details).[INFO] Exclude: 
spring-shell.log[INFO] 25 resources included (use -debug for more 
details)[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 
0 approved: 24 licence.[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 27 iota=55[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-mvn) @ rya.console 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 27 iota=55[INFO] 
[INFO] --- jacoco-maven-plugin:0.7.6.201602180812:prepare-agent 
(default-prepare-agent) @ rya.console ---[INFO] argLine set to 
-javaagent:/home/jenkins
 
/jenkins-slave/maven-repositories/0/org/jacoco/org.jacoco.agent/0.7.6.201602180812/org.jacoco.agent-0.7.6.201602180812-runtime.jar=destfile=/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.console/target/jacoco.exec[WARNING]
 Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 27 iota=55[INFO] 
[INFO] --- license-maven-plugin:2.6:format (default) @ rya.console ---[INFO] 
Updating license headers...[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 27 iota=55[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ rya.console 
---Build was abortedchannel stoppedSetting status of 
c455851f013d9a82257717a4fecdd54756bf8c2a to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/296/
 and message: 'FAILURE 'Using context: Jenkins: cle
 an package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/188
  
My main concern here is that we exposed a number of accumulo specific 
operations that are not really optional which will make implementing a mongo 
console implementation very difficult.  I think maybe adding some checks to see 
if you are creating an accumulo instance might alleviate that concern.  


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #188: RYA-318 Rya Shell improvements for packaging, load...

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/188
  
My main concern here is that we exposed a number of accumulo specific 
operations that are not really optional which will make implementing a mongo 
console implementation very difficult.  I think maybe adding some checks to see 
if you are creating an accumulo instance might alleviate that concern.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-216) Clean up Maven Warnings

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-216:


Github user asfgit closed the pull request at:

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


> Clean up Maven Warnings
> ---
>
> Key: RYA-216
> URL: https://issues.apache.org/jira/browse/RYA-216
> Project: Rya
>  Issue Type: Bug
>Affects Versions: 3.2.10
>Reporter: Aaron Mihalik
>Assignee: Jeff Dasch
>
> During the evaluation of Rya 3.2.10-RC3, it was noted that maven generates a 
> lot of warnings during the build.  We should resolve these in order to reduce 
> the likelihood of build issues from users.  Here's the example of some 
> warnings:
> {code}
> % mvn install -DskipTests 
>   
>   
>  -
> [INFO] Scanning for projects...
> Downloading: 
> http://repository.codehaus.org/org/codehaus/groovy/groovy-eclipse-batch/maven-metadata.xml
> Downloading: 
> http://nexus.codehaus.org/snapshots/org/codehaus/groovy/groovy-eclipse-batch/maven-metadata.xml
> [WARNING] Could not transfer metadata 
> org.codehaus.groovy:groovy-eclipse-batch/maven-metadata.xml from/to 
> codehaus.org (http://repository.codehaus.org): repository.codehaus.org: 
> unknown error
> [WARNING] Could not transfer metadata 
> org.codehaus.groovy:groovy-eclipse-batch/maven-metadata.xml from/to 
> codehaus-snapshots (http://nexus.codehaus.org/snapshots/): 
> nexus.codehaus.org: unknown error
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.rya:rya.prospector:jar:3.2.10-incubating
> [WARNING] 'build.plugins.plugin.version' for 
> org.apache.maven.plugins:maven-shade-plugin is missing. @ 
> org.apache.rya:rya.prospector:[unknown-version], 
> /Users/jelser/rya-3.2.10-rc3/rya-project-3.2.10-incubating/extras/rya.prospector/pom.xml,
>  line 107, column 21
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.rya:rya.indexing:jar:3.2.10-incubating
> [WARNING] 'build.plugins.plugin.version' for 
> org.apache.maven.plugins:maven-shade-plugin is missing. @ 
> org.apache.rya:rya.indexing:[unknown-version], 
> /Users/jelser/rya-3.2.10-rc3/rya-project-3.2.10-incubating/extras/indexing/pom.xml,
>  line 135, column 12
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.rya:rya.reasoning:jar:3.2.10-incubating
> [WARNING] 'build.plugins.plugin.version' for 
> org.apache.maven.plugins:maven-shade-plugin is missing. @ 
> org.apache.rya:rya.reasoning:[unknown-version], 
> /Users/jelser/rya-3.2.10-rc3/rya-project-3.2.10-incubating/extras/rya.reasoning/pom.xml,
>  line 98, column 21
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.rya:rya.benchmark:jar:3.2.10-incubating
> [WARNING] 'build.plugins.plugin.version' for 
> org.codehaus.mojo:jaxb2-maven-plugin is missing. @ 
> org.apache.rya:rya.benchmark:[unknown-version], 
> /Users/jelser/rya-3.2.10-rc3/rya-project-3.2.10-incubating/extras/rya.benchmark/pom.xml,
>  line 81, column 21
> [WARNING]
> [WARNING] Some problems were encountered while building the effective model 
> for org.apache.rya:accumulo.pig:jar:3.2.10-incubating
> [WARNING] 'build.plugins.plugin.version' for 
> org.apache.maven.plugins:maven-shade-plugin is missing. @ 
> org.apache.rya:accumulo.pig:[unknown-version], 
> /Users/jelser/rya-3.2.10-rc3/rya-project-3.2.10-incubating/pig/accumulo.pig/pom.xml,
>  line 82, column 21
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they 
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support 
> building such malformed projects.
> [WARNING]
> [INFO] 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12856
  
--- Diff: 
extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java ---
@@ -200,8 +201,65 @@ public String install() {
 }
 }
 
-@CliCommand(value = GET_INSTANCE_DETAILS_CMD, help = "Print 
information about how the Rya instance is configured.")
-public String getInstanceDetails() {
+@CliCommand(value = INSTALL_PARAMETERS_CMD, help = "Create a new 
instance of Rya with command line parameters.")
+public String installWithParameters(
+@CliOption(key = {"instanceName"}, mandatory = true, help = 
"The name of the Rya instance to create.")
+final String instanceName,
+
+@CliOption(key = {"enableTableHashPrefix"}, mandatory = false, 
help = "Use Shard Balancing (improves streamed input write speeds).", 
unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+final boolean enableTableHashPrefix,
+
+@CliOption(key = {"enableEntityCentricIndex"}, mandatory = 
false, help = "Use Entity Centric Indexing.", unspecifiedDefaultValue = 
"false", specifiedDefaultValue = "true")
+final boolean enableEntityCentricIndex,
+
+@CliOption(key = {"enableFreeTextIndex"}, mandatory = false, 
help = "Use Free Text Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableFreeTextIndex,
+
+@CliOption(key = {"enableGeospatialIndex"}, mandatory = false, 
help = "Use Geospatial Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableGeospatialIndex,
+
+@CliOption(key = {"enableTemporalIndex"}, mandatory = false, 
help = "Use Temporal Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableTemporalIndex,
+
+@CliOption(key = {"enablePcjIndex"}, mandatory = false, help = 
"Use Precomputed Join (PCJ) Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enablePcjIndex,
+
+@CliOption(key = {"fluoPcjAppName"}, mandatory = false, help = 
"Fluo Application Name for PCJ Index Updater (fluo app must be initialized and 
enablePcjIndex=true).")
--- End diff --

some of this stuff is very accumulo specific -- i'm not sure how to address 
that for when we implement mongo support.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #185: RYA-216 Cleaned up maven build warnings and...

2017-07-27 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r12856
  
--- Diff: 
extras/rya.console/src/main/java/org/apache/rya/shell/RyaAdminCommands.java ---
@@ -200,8 +201,65 @@ public String install() {
 }
 }
 
-@CliCommand(value = GET_INSTANCE_DETAILS_CMD, help = "Print 
information about how the Rya instance is configured.")
-public String getInstanceDetails() {
+@CliCommand(value = INSTALL_PARAMETERS_CMD, help = "Create a new 
instance of Rya with command line parameters.")
+public String installWithParameters(
+@CliOption(key = {"instanceName"}, mandatory = true, help = 
"The name of the Rya instance to create.")
+final String instanceName,
+
+@CliOption(key = {"enableTableHashPrefix"}, mandatory = false, 
help = "Use Shard Balancing (improves streamed input write speeds).", 
unspecifiedDefaultValue = "false", specifiedDefaultValue = "true")
+final boolean enableTableHashPrefix,
+
+@CliOption(key = {"enableEntityCentricIndex"}, mandatory = 
false, help = "Use Entity Centric Indexing.", unspecifiedDefaultValue = 
"false", specifiedDefaultValue = "true")
+final boolean enableEntityCentricIndex,
+
+@CliOption(key = {"enableFreeTextIndex"}, mandatory = false, 
help = "Use Free Text Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableFreeTextIndex,
+
+@CliOption(key = {"enableGeospatialIndex"}, mandatory = false, 
help = "Use Geospatial Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableGeospatialIndex,
+
+@CliOption(key = {"enableTemporalIndex"}, mandatory = false, 
help = "Use Temporal Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enableTemporalIndex,
+
+@CliOption(key = {"enablePcjIndex"}, mandatory = false, help = 
"Use Precomputed Join (PCJ) Indexing.", unspecifiedDefaultValue = "false", 
specifiedDefaultValue = "true")
+final boolean enablePcjIndex,
+
+@CliOption(key = {"fluoPcjAppName"}, mandatory = false, help = 
"Fluo Application Name for PCJ Index Updater (fluo app must be initialized and 
enablePcjIndex=true).")
--- End diff --

some of this stuff is very accumulo specific -- i'm not sure how to address 
that for when we implement mongo support.  


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12701
  
--- Diff: extras/rya.console/src/main/examples/lubm.script ---
@@ -0,0 +1,39 @@
+#
+# 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.
+#
+
+connect-accumulo --username accumulo_user --instanceName accumulo_instance 
--zookeepers zoo1,zoo2,zoo3,zoo4,zoo5
--- End diff --

this might be more appropriate as an example or something rather than 
checked in here.  also i remember there being some concern with creating 
distribution artifacts -- i think at one point we were told to try to avoid due 
to licensing concerns.  I don't remember the details though.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r12701
  
--- Diff: extras/rya.console/src/main/examples/lubm.script ---
@@ -0,0 +1,39 @@
+#
+# 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.
+#
+
+connect-accumulo --username accumulo_user --instanceName accumulo_instance 
--zookeepers zoo1,zoo2,zoo3,zoo4,zoo5
--- End diff --

this might be more appropriate as an example or something rather than 
checked in here.  also i remember there being some concern with creating 
distribution artifacts -- i think at one point we were told to try to avoid due 
to licensing concerns.  I don't remember the details though.  


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r12450
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
+ */
+@DefaultAnnotation(NonNull.class)
+public class AccumuloExecuteSparqlQuery extends AccumuloCommand implements 
ExecuteSparqlQuery {
+private static final Logger log = 
Logger.getLogger(AccumuloExecuteSparqlQuery.class);
+
+private final InstanceExists instanceExists;
+
+/**
+ * Constructs an instance of {@link AccumuloExecuteSparqlQuery}.
+ *
+ * @param connectionDetails - Details about the values that were used 
to create
+ *   the connector to the cluster. (not null)
+ * @param connector - Provides programmatic access to the instance of 
Accumulo
+ *   that hosts Rya instance. (not null)
+ */
+public AccumuloExecuteSparqlQuery(final AccumuloConnectionDetails 
connectionDetails, final Connector connector) {
+super(connectionDetails, connector);
+instanceExists = new AccumuloInstanceExists(connectionDetails, 
connector);
+}
+
+
+@Override
+public String executeSparqlQuery(final String ryaInstanceName, final 
String sparqlQuery)
+throws InstanceDoesNotExistException, RyaClientException {
+requireNonNull(ryaInstanceName);
+requireNonNull(sparqlQuery);
+
+// Ensure the Rya Instance exists.
+if(!instanceExists.exists(ryaInstanceName)) {
+throw new InstanceDoesNotExistException(String.format("There 
is no Rya instance named '%s'.", ryaInstanceName));
+}
+
+
+Sail sail = null;
+SailRepository sailRepo = null;
+SailRepositoryConnection sailRepoConn = null;
+
+try {
+// Get a Sail object that is connected to the Rya instance.
+final AccumuloRdfConfiguration ryaConf = 
getAccumuloConnectionDetails().buildAccumuloRdfConfiguration(ryaInstanceName);
+

[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12450
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
+ */
+@DefaultAnnotation(NonNull.class)
+public class AccumuloExecuteSparqlQuery extends AccumuloCommand implements 
ExecuteSparqlQuery {
+private static final Logger log = 
Logger.getLogger(AccumuloExecuteSparqlQuery.class);
+
+private final InstanceExists instanceExists;
+
+/**
+ * Constructs an instance of {@link AccumuloExecuteSparqlQuery}.
+ *
+ * @param connectionDetails - Details about the values that were used 
to create
+ *   the connector to the cluster. (not null)
+ * @param connector - Provides programmatic access to the instance of 
Accumulo
+ *   that hosts Rya instance. (not null)
+ */
+public AccumuloExecuteSparqlQuery(final AccumuloConnectionDetails 
connectionDetails, final Connector connector) {
+super(connectionDetails, connector);
+instanceExists = new AccumuloInstanceExists(connectionDetails, 
connector);
+}
+
+
+@Override
+public String executeSparqlQuery(final String ryaInstanceName, final 
String sparqlQuery)
+throws InstanceDoesNotExistException, RyaClientException {
+requireNonNull(ryaInstanceName);
+requireNonNull(sparqlQuery);
+
+// Ensure the Rya Instance exists.
+if(!instanceExists.exists(ryaInstanceName)) {
+throw new InstanceDoesNotExistException(String.format("There 
is no Rya instance named '%s'.", ryaInstanceName));
+}
+
+
+Sail sail = null;
+SailRepository sailRepo = null;
+SailRepositoryConnection sailRepoConn = null;
+
+try {
+// Get a Sail object that is connected to the Rya instance.
+final AccumuloRdfConfiguration ryaConf = 
getAccumuloConnectionDetails().buildAccumuloRdfConfiguration(ryaInstanceName);
+sail = RyaSailFactory.getInstance(ryaConf);
+
+// Load the file.
+sailRepo = new SailRepository(sail);
+sailRepoConn = sailRepo.getConnection();
+final long start 

[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread amihalik
Github user amihalik commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12333
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
+ */
+@DefaultAnnotation(NonNull.class)
+public class AccumuloExecuteSparqlQuery extends AccumuloCommand implements 
ExecuteSparqlQuery {
+private static final Logger log = 
Logger.getLogger(AccumuloExecuteSparqlQuery.class);
+
+private final InstanceExists instanceExists;
+
+/**
+ * Constructs an instance of {@link AccumuloExecuteSparqlQuery}.
+ *
+ * @param connectionDetails - Details about the values that were used 
to create
+ *   the connector to the cluster. (not null)
+ * @param connector - Provides programmatic access to the instance of 
Accumulo
+ *   that hosts Rya instance. (not null)
+ */
+public AccumuloExecuteSparqlQuery(final AccumuloConnectionDetails 
connectionDetails, final Connector connector) {
+super(connectionDetails, connector);
+instanceExists = new AccumuloInstanceExists(connectionDetails, 
connector);
+}
+
+
+@Override
+public String executeSparqlQuery(final String ryaInstanceName, final 
String sparqlQuery)
+throws InstanceDoesNotExistException, RyaClientException {
+requireNonNull(ryaInstanceName);
+requireNonNull(sparqlQuery);
+
+// Ensure the Rya Instance exists.
+if(!instanceExists.exists(ryaInstanceName)) {
+throw new InstanceDoesNotExistException(String.format("There 
is no Rya instance named '%s'.", ryaInstanceName));
+}
+
+
+Sail sail = null;
+SailRepository sailRepo = null;
+SailRepositoryConnection sailRepoConn = null;
+
+try {
+// Get a Sail object that is connected to the Rya instance.
+final AccumuloRdfConfiguration ryaConf = 
getAccumuloConnectionDetails().buildAccumuloRdfConfiguration(ryaInstanceName);
+sail = RyaSailFactory.getInstance(ryaConf);
+
+// Load the file.
+sailRepo = new SailRepository(sail);
+sailRepoConn = sailRepo.getConnection();
+final long 

[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread amihalik
Github user amihalik commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r129998856
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
--- End diff --

ExecuteSparqlQuery?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r129998856
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
--- End diff --

ExecuteSparqlQuery?


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r12058
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
+ */
+@DefaultAnnotation(NonNull.class)
+public class AccumuloExecuteSparqlQuery extends AccumuloCommand implements 
ExecuteSparqlQuery {
+private static final Logger log = 
Logger.getLogger(AccumuloExecuteSparqlQuery.class);
+
+private final InstanceExists instanceExists;
+
+/**
+ * Constructs an instance of {@link AccumuloExecuteSparqlQuery}.
+ *
+ * @param connectionDetails - Details about the values that were used 
to create
+ *   the connector to the cluster. (not null)
+ * @param connector - Provides programmatic access to the instance of 
Accumulo
+ *   that hosts Rya instance. (not null)
+ */
+public AccumuloExecuteSparqlQuery(final AccumuloConnectionDetails 
connectionDetails, final Connector connector) {
+super(connectionDetails, connector);
+instanceExists = new AccumuloInstanceExists(connectionDetails, 
connector);
+}
+
+
+@Override
+public String executeSparqlQuery(final String ryaInstanceName, final 
String sparqlQuery)
+throws InstanceDoesNotExistException, RyaClientException {
+requireNonNull(ryaInstanceName);
+requireNonNull(sparqlQuery);
+
+// Ensure the Rya Instance exists.
+if(!instanceExists.exists(ryaInstanceName)) {
+throw new InstanceDoesNotExistException(String.format("There 
is no Rya instance named '%s'.", ryaInstanceName));
+}
+
+
+Sail sail = null;
+SailRepository sailRepo = null;
+SailRepositoryConnection sailRepoConn = null;
+
+try {
+// Get a Sail object that is connected to the Rya instance.
+final AccumuloRdfConfiguration ryaConf = 
getAccumuloConnectionDetails().buildAccumuloRdfConfiguration(ryaInstanceName);
+

[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread amihalik
Github user amihalik commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12058
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloExecuteSparqlQuery.java
 ---
@@ -0,0 +1,150 @@
+/**
+ * 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.client.accumulo;
+
+import static java.util.Objects.requireNonNull;
+
+import java.text.DecimalFormat;
+
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.log4j.Logger;
+import org.apache.rya.accumulo.AccumuloRdfConfiguration;
+import org.apache.rya.api.client.ExecuteSparqlQuery;
+import org.apache.rya.api.client.InstanceDoesNotExistException;
+import org.apache.rya.api.client.InstanceExists;
+import org.apache.rya.api.client.LoadStatementsFile;
+import org.apache.rya.api.client.RyaClientException;
+import org.apache.rya.api.persist.RyaDAOException;
+import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
+import org.apache.rya.sail.config.RyaSailFactory;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQuery;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.SailException;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * An Accumulo implementation of the {@link LoadStatementsFile} command.
+ */
+@DefaultAnnotation(NonNull.class)
+public class AccumuloExecuteSparqlQuery extends AccumuloCommand implements 
ExecuteSparqlQuery {
+private static final Logger log = 
Logger.getLogger(AccumuloExecuteSparqlQuery.class);
+
+private final InstanceExists instanceExists;
+
+/**
+ * Constructs an instance of {@link AccumuloExecuteSparqlQuery}.
+ *
+ * @param connectionDetails - Details about the values that were used 
to create
+ *   the connector to the cluster. (not null)
+ * @param connector - Provides programmatic access to the instance of 
Accumulo
+ *   that hosts Rya instance. (not null)
+ */
+public AccumuloExecuteSparqlQuery(final AccumuloConnectionDetails 
connectionDetails, final Connector connector) {
+super(connectionDetails, connector);
+instanceExists = new AccumuloInstanceExists(connectionDetails, 
connector);
+}
+
+
+@Override
+public String executeSparqlQuery(final String ryaInstanceName, final 
String sparqlQuery)
+throws InstanceDoesNotExistException, RyaClientException {
+requireNonNull(ryaInstanceName);
+requireNonNull(sparqlQuery);
+
+// Ensure the Rya Instance exists.
+if(!instanceExists.exists(ryaInstanceName)) {
+throw new InstanceDoesNotExistException(String.format("There 
is no Rya instance named '%s'.", ryaInstanceName));
+}
+
+
+Sail sail = null;
+SailRepository sailRepo = null;
+SailRepositoryConnection sailRepoConn = null;
+
+try {
+// Get a Sail object that is connected to the Rya instance.
+final AccumuloRdfConfiguration ryaConf = 
getAccumuloConnectionDetails().buildAccumuloRdfConfiguration(ryaInstanceName);
+sail = RyaSailFactory.getInstance(ryaConf);
+
+// Load the file.
--- End diff --

?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. 

[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


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

https://github.com/apache/incubator-rya/pull/188#discussion_r12335
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/client/LoadStatementsFile.java 
---
@@ -31,14 +31,16 @@
 @DefaultAnnotation(NonNull.class)
 public interface LoadStatementsFile {
 
-/**
- * Loads a local file of RDF statements into an instance of Rya.
- *
- * @param ryaInstanceName - The name of the Rya instance the 
statements will be loaded into. (not null)
- * @param statementsFile - A file that holds RDF statements that will 
be loaded. (not null)
- * @param format - The format of the statements file. (not null)
- * @throws InstanceDoesNotExistException No instance of Rya exists for 
the provided name.
- * @throws RyaClientException Something caused the command to fail.
- */
-public void loadStatements(String ryaInstanceName, Path 
statementsFile, RDFFormat format) throws InstanceDoesNotExistException, 
RyaClientException;
+   /**
+* Loads a local file of RDF statements into an instance of Rya.
+*
+* @param ryaInstanceName - The name of the Rya instance the statements 
will be loaded into. (not null)
+* @param statementsFile - A file that holds RDF statements that will 
be loaded. (not null)
+* @param format - The format of the statements file. (not null)
+* @param flushEachUpdate - If true, each statement will be flushed 
individually. If false, statements will be
+*grouped in an unspecified manner. A value of false will 
typically yield higher ingest rates.
+* @throws InstanceDoesNotExistException No instance of Rya exists for 
the provided name.
+* @throws RyaClientException Something caused the command to fail.
+*/
+public void loadStatements(String ryaInstanceName, Path 
statementsFile, RDFFormat format, boolean flushEachUpdate) throws 
InstanceDoesNotExistException, RyaClientException;
--- End diff --

why was the flush parameter exposed?  


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/188#discussion_r12335
  
--- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/client/LoadStatementsFile.java 
---
@@ -31,14 +31,16 @@
 @DefaultAnnotation(NonNull.class)
 public interface LoadStatementsFile {
 
-/**
- * Loads a local file of RDF statements into an instance of Rya.
- *
- * @param ryaInstanceName - The name of the Rya instance the 
statements will be loaded into. (not null)
- * @param statementsFile - A file that holds RDF statements that will 
be loaded. (not null)
- * @param format - The format of the statements file. (not null)
- * @throws InstanceDoesNotExistException No instance of Rya exists for 
the provided name.
- * @throws RyaClientException Something caused the command to fail.
- */
-public void loadStatements(String ryaInstanceName, Path 
statementsFile, RDFFormat format) throws InstanceDoesNotExistException, 
RyaClientException;
+   /**
+* Loads a local file of RDF statements into an instance of Rya.
+*
+* @param ryaInstanceName - The name of the Rya instance the statements 
will be loaded into. (not null)
+* @param statementsFile - A file that holds RDF statements that will 
be loaded. (not null)
+* @param format - The format of the statements file. (not null)
+* @param flushEachUpdate - If true, each statement will be flushed 
individually. If false, statements will be
+*grouped in an unspecified manner. A value of false will 
typically yield higher ingest rates.
+* @throws InstanceDoesNotExistException No instance of Rya exists for 
the provided name.
+* @throws RyaClientException Something caused the command to fail.
+*/
+public void loadStatements(String ryaInstanceName, Path 
statementsFile, RDFFormat format, boolean flushEachUpdate) throws 
InstanceDoesNotExistException, RyaClientException;
--- End diff --

why was the flush parameter exposed?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-284) Enhance accumulo.rya to support the use of bloom filter

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-284:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/170
  
@thn-w , can you address the test failures?


> Enhance accumulo.rya to support the use of bloom filter
> ---
>
> Key: RYA-284
> URL: https://issues.apache.org/jira/browse/RYA-284
> Project: Rya
>  Issue Type: Improvement
>  Components: dao
>Reporter: Tri H. Nguyen
>Assignee: Tri H. Nguyen
>Priority: Minor
>
> Enhancing accumulo.rya to take advantage of the use of bloom filter when 
> enabled in accumulo
> Accumulo's Bloom Filter example
> https://accumulo.apache.org/1.8/examples/bloom



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #170: RYA-284: updated to support the use of bloom filte...

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/170
  
@thn-w , can you address the test failures?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-324) geoWave and geoMesa depend on different versions of the GeoTools

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-324:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/182
  
In general, this looks ok -- I agree with Andrew's comments but I'm not 
sure that that should hold up merging this pr -- introducing a factory could be 
done as a follow on task if it is documented in jira.  


> geoWave and geoMesa depend on different versions of the GeoTools
> 
>
> Key: RYA-324
> URL: https://issues.apache.org/jira/browse/RYA-324
> Project: Rya
>  Issue Type: Bug
>  Components: sail
>Affects Versions: 3.2.10
>Reporter: David W. Lotts
>Assignee: David W. Lotts
>  Labels: dependencies, geo, refactor
> Fix For: 3.2.10
>
>
> Refactored geo libraries into separate projects/modules/jars.
> Geo libraries are optional and turned off by default because the GeoTools is 
> has an incompatible license.
> Further, geoWave and geoMesa depend on different versions of the GeoTools, so 
> they must be in separate projects.
> The new modules (projects) are
> geo.common
> geo.mongo
> geo.geomesa
> geo.geowave
> These are modules of the project rya.geoindexing



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RYA-324) geoWave and geoMesa depend on different versions of the GeoTools

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-324:


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

https://github.com/apache/incubator-rya/pull/182#discussion_r129998163
  
--- Diff: web/web.rya/maven-eclipse.xml ---
@@ -0,0 +1,8 @@
+
+  
+  
+
--- End diff --

this file probably wasn't supposed to be checked in.


> geoWave and geoMesa depend on different versions of the GeoTools
> 
>
> Key: RYA-324
> URL: https://issues.apache.org/jira/browse/RYA-324
> Project: Rya
>  Issue Type: Bug
>  Components: sail
>Affects Versions: 3.2.10
>Reporter: David W. Lotts
>Assignee: David W. Lotts
>  Labels: dependencies, geo, refactor
> Fix For: 3.2.10
>
>
> Refactored geo libraries into separate projects/modules/jars.
> Geo libraries are optional and turned off by default because the GeoTools is 
> has an incompatible license.
> Further, geoWave and geoMesa depend on different versions of the GeoTools, so 
> they must be in separate projects.
> The new modules (projects) are
> geo.common
> geo.mongo
> geo.geomesa
> geo.geowave
> These are modules of the project rya.geoindexing



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #182: RYA-324, RYA-272 Geo refactoring and exampl...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/182#discussion_r129998163
  
--- Diff: web/web.rya/maven-eclipse.xml ---
@@ -0,0 +1,8 @@
+
+  
+  
+
--- End diff --

this file probably wasn't supposed to be checked in.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #182: RYA-324, RYA-272 Geo refactoring and exampl...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/182#discussion_r129997867
  
--- Diff: 
extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/GeoIndexerType.java
 ---
@@ -31,31 +28,49 @@
 /**
  * Geo Mesa based indexer.
  */
-GEO_MESA(GeoMesaGeoIndexer.class),
+GEO_MESA("org.apache.rya.indexing.accumulo.geo.GeoMesaGeoIndexer"),
 /**
  * Geo Wave based indexer.
  */
-GEO_WAVE(GeoWaveGeoIndexer.class),
+GEO_WAVE("org.apache.rya.indexing.accumulo.geo.GeoWaveGeoIndexer"),
 /**
  * MongoDB based indexer.
  */
-MONGO_DB(MongoGeoIndexer.class);
+MONGO_DB("org.apache.rya.indexing.mongodb.geo.MongoGeoIndexer"),
+   
+   
MONGO_GEO_TEMPORAL("org.apache.rya.indexing.geotemporal.mongo.MongoGeoTemporalIndexer"),
+   
MONGO_GEO_TEMPORAL_OPTIMIZER("org.apache.rya.indexing.geotemporal.GeoTemporalOptimizer");
 
-private Class geoIndexerClass;
+//private Class geoIndexerClass;
+   private String geoIndexerClassString;
 
 /**
  * Creates a new {@link GeoIndexerType}.
  * @param geoIndexerClass the {@link GeoIndexer} {@link Class}.
  * (not {@code null})
  */
-private GeoIndexerType(final Class 
geoIndexerClass) {
-this.geoIndexerClass = checkNotNull(geoIndexerClass);
+private GeoIndexerType(final String geoIndexerClassString) {
+this.geoIndexerClassString = checkNotNull(geoIndexerClassString);
 }
 
 /**
  * @return the {@link GeoIndexer} {@link Class}. (not {@code null})
  */
-public Class getGeoIndexerClass() {
-return geoIndexerClass;
-}
+public String getGeoIndexerClassString() {
+   
+return geoIndexerClassString;
+   }
+
+   /**
+ * @return True if the class exists on the classpath.
+ */
+   public boolean isOnClassPath() {
+   try {
+   Class.forName(geoIndexerClassString, false, 
this.getClass().getClassLoader());
--- End diff --

I agree.  A factory seems like a better pattern, it seems like we could be 
doing something more elegant here.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #182: RYA-324, RYA-272 Geo refactoring and exampl...

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/182#discussion_r129997683
  
--- Diff: 
extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/GeoEnabledFilterFunctionOptimizer.java
 ---
@@ -98,18 +96,23 @@ public void setConf(final Configuration conf) {
 init = false;
 init();
 }
-
+/**
+ * Load instances of the selected indexers.  This is tricky because 
some (geomesa vs geowave) have incompatible dependencies (geotools versions).
+ */
 private synchronized void init() {
 if (!init) {
-if (ConfigUtils.getUseMongo(conf)) {
-geoIndexer = new MongoGeoIndexer();
-geoIndexer.setConf(conf);
-freeTextIndexer = new MongoFreeTextIndexer();
-freeTextIndexer.setConf(conf);
-temporalIndexer = new MongoTemporalIndexer();
-temporalIndexer.setConf(conf);
+   if (ConfigUtils.getUseMongo(conf)) {
+   // create a new MongoGeoIndexer() without 
having it at compile time.
+   geoIndexer = 
instantiate(GeoIndexerType.MONGO_DB.getGeoIndexerClassString(), 
GeoIndexer.class);
+   geoIndexer.setConf(conf);
+   freeTextIndexer = new MongoFreeTextIndexer();
+   freeTextIndexer.setConf(conf);
+   temporalIndexer = new MongoTemporalIndexer();
+   temporalIndexer.setConf(conf);
 } else {
-geoIndexer = new GeoMesaGeoIndexer();
+//geoIndexer = new GeoMesaGeoIndexer();
--- End diff --

can you remove the commented out code?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-280) PeriodicQuery Support for Fluo

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-280:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/177
  
hey @meiercaleb  this looked fine to me -- address Aaron's two comments and 
I think it is ready to merge.  


> PeriodicQuery Support for Fluo
> --
>
> Key: RYA-280
> URL: https://issues.apache.org/jira/browse/RYA-280
> Project: Rya
>  Issue Type: New Feature
>  Components: clients
>Affects Versions: 3.2.10
>Reporter: Caleb Meier
>Assignee: Caleb Meier
>
> Add the capability to Rya-Fluo App to provide periodic updates for queries 
> registered with Fluo.  That is, provide the application with the ability to 
> satisfy the standing query "tell me every 12 hours about all of the events of 
> a particular type that occurred within the last 24 hours".  Given that Fluo 
> operates using a push based notification system, some external service needs 
> to be implemented to periodically notify Fluo to generate a result 
> notification (this helps handle the non-event event that occurs when nothing 
> happens in a given period of time).  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #183: RYA-323 Enabling Multi Var Geo Functions. Closes #...

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
@pujav65 yeah puja hold off on merging any of these PRs until we get the 
build sorted.  we'll test out @isper3at's #187 and #186 PRs first, then 
determine if need this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #177: RYA-280-Periodic Query Service

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/177
  
hey @meiercaleb  this looked fine to me -- address Aaron's two comments and 
I think it is ready to merge.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-323) Enable Multi Var Geo Functions

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-323:


Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
@pujav65 yeah puja hold off on merging any of these PRs until we get the 
build sorted.  we'll test out @isper3at's #187 and #186 PRs first, then 
determine if need this PR.


> Enable Multi Var Geo Functions
> --
>
> Key: RYA-323
> URL: https://issues.apache.org/jira/browse/RYA-323
> Project: Rya
>  Issue Type: Improvement
>  Components: sail
>Reporter: Aaron Mihalik
>Assignee: Aaron Mihalik
>
> Currently, all Rya GeoSPARQL functions must have at least one parameter as a 
> constant, eg:
> {code}
>   ?point geo:asWKT ?wkt .
>   FILTER(geof:sfWithin(?wkt, "POLYGON(( ... ))"^^geo:wktLiteral)) 
> {code}
> however, there is no good reason for this.  In fact, we will later want to 
> support functions that take in two variables.  For instance, a previous set 
> of statement patterns will resolve a wkt, then I want to pass that wkt value 
> into the function, eg:
> {code}
> ?point .
>   ?point geo:asWKT ?wkt1 .
>   ?point geo:asWKT ?wkt2 .
>   FILTER(geof:near(?wkt2, ?wkt1)) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #181: Rya-307 MongoDB Rya DAO Batch Writer

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/181
  
looks good to me -- @isper3at are you ok with this pr?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #180: RYA-293 Added owl:unionOf inference

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/180
  
hey @jessehatfield , it looks like there are test failures:
https://builds.apache.org/job/incubator-rya-fork/24/
Can you verify that these are false failures?  They do not look like they 
are related to your pull request.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-293) Implement owl:unionOf inference

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-293:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/180
  
hey @jessehatfield , it looks like there are test failures:
https://builds.apache.org/job/incubator-rya-fork/24/
Can you verify that these are false failures?  They do not look like they 
are related to your pull request.


> Implement owl:unionOf inference
> ---
>
> Key: RYA-293
> URL: https://issues.apache.org/jira/browse/RYA-293
> Project: Rya
>  Issue Type: Sub-task
>  Components: sail
>Reporter: Jesse Hatfield
>Assignee: Jesse Hatfield
>
> An *{{owl:unionOf}}* expression defines one type to be equivalent to the 
> union of another set of types. If the ontology states that {{:Parent}} is the 
> union of {{:Mother}} and {{:Father}}, then the inference engine should 
> rewrite statement patterns of the form {{?x rdf:type :Parent}} to check for 
> resources that are stated to be any of the types {{:Mother}}, {{:Father}}, or 
> {{:Parent}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #180: RYA-293 Added owl:unionOf inference

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/180
  
looks good -- kicking of a build to merge


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-293) Implement owl:unionOf inference

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-293:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/180
  
looks good -- kicking of a build to merge


> Implement owl:unionOf inference
> ---
>
> Key: RYA-293
> URL: https://issues.apache.org/jira/browse/RYA-293
> Project: Rya
>  Issue Type: Sub-task
>  Components: sail
>Reporter: Jesse Hatfield
>Assignee: Jesse Hatfield
>
> An *{{owl:unionOf}}* expression defines one type to be equivalent to the 
> union of another set of types. If the ontology states that {{:Parent}} is the 
> union of {{:Mother}} and {{:Father}}, then the inference engine should 
> rewrite statement patterns of the form {{?x rdf:type :Parent}} to check for 
> resources that are stated to be any of the types {{:Mother}}, {{:Father}}, or 
> {{:Parent}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (RYA-323) Enable Multi Var Geo Functions

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-323:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
wait, just read the comment chain -- is this pr obe @amihalik @isper3at ?


> Enable Multi Var Geo Functions
> --
>
> Key: RYA-323
> URL: https://issues.apache.org/jira/browse/RYA-323
> Project: Rya
>  Issue Type: Improvement
>  Components: sail
>Reporter: Aaron Mihalik
>Assignee: Aaron Mihalik
>
> Currently, all Rya GeoSPARQL functions must have at least one parameter as a 
> constant, eg:
> {code}
>   ?point geo:asWKT ?wkt .
>   FILTER(geof:sfWithin(?wkt, "POLYGON(( ... ))"^^geo:wktLiteral)) 
> {code}
> however, there is no good reason for this.  In fact, we will later want to 
> support functions that take in two variables.  For instance, a previous set 
> of statement patterns will resolve a wkt, then I want to pass that wkt value 
> into the function, eg:
> {code}
> ?point .
>   ?point geo:asWKT ?wkt1 .
>   ?point geo:asWKT ?wkt2 .
>   FILTER(geof:near(?wkt2, ?wkt1)) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #183: RYA-323 Enabling Multi Var Geo Functions. Closes #...

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
wait, just read the comment chain -- is this pr obe @amihalik @isper3at ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129987379
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/accumulo/geo/GeoTupleSet.java
 ---
@@ -349,6 +371,100 @@ public String toString() {
 };
 };
 
+private final SearchFunction GEO_NEAR = new SearchFunction() {
+@Override
+public CloseableIteration 
performSearch(final String queryText,
+final StatementConstraints contraints) throws 
QueryEvaluationException {
+try {
+final String[] args = queryText.split(NEAR_DELIM);
+Optional maxDistanceOpt = Optional.empty();
+Optional minDistanceOpt = Optional.empty();
+final String query = args[0];
+
+for (int ii = 1; ii < args.length; ii++) {
+String numArg = args[ii];
+
+// remove pre-padding 0's since 
NumberUtils.isNumber()
+// will assume its octal if it starts with a 0.
+while (numArg.startsWith("0")) {
+numArg = numArg.substring(1);
+}
+// was 0
+if (numArg.equals("")) {
+// if max hasn't been set, set it to 0.
+// Otherwise, min is just ignored.
+if (!maxDistanceOpt.isPresent()) {
+maxDistanceOpt = Optional.of(0.0);
+}
+} else {
+if (!maxDistanceOpt.isPresent() && 
NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+maxDistanceOpt = getDistanceOpt(numArg, 
"maxDistance");
+} else if (NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+minDistanceOpt = getDistanceOpt(numArg, 
"minDistance");
+} else {
+throw new IllegalArgumentException(numArg 
+ " is not a valid Near function argument.");
+}
+}
+}
+final WKTReader reader = new WKTReader();
+final Geometry geometry = reader.read(query);
+final NearQuery nearQuery = new 
NearQuery(maxDistanceOpt, minDistanceOpt, geometry);
+return geoIndexer.queryNear(nearQuery, contraints);
+} catch (final ParseException e) {
+throw new QueryEvaluationException(e);
+}
+}
+
+private Optional getDistanceOpt(final String num, 
final String name) {
+try {
+return Optional.of(Double.parseDouble(num));
+} catch (final NumberFormatException nfe) {
--- End diff --

ok, so it can't be negative.  good catch.  Adding a check for that now 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129985187
  
--- Diff: 
extras/rya.geoindexing/src/test/java/org/apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
 ---
@@ -0,0 +1,266 @@
+/*
+ * 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.indexing.mongo;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.resolver.RdfToRyaConversions;
+import org.apache.rya.api.resolver.RyaToRdfConversions;
+import org.apache.rya.indexing.GeoConstants;
+import org.apache.rya.indexing.GeoRyaSailFactory;
+import org.apache.rya.indexing.OptionalConfigUtils;
+import org.apache.rya.indexing.accumulo.ConfigUtils;
+import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
+import org.apache.rya.mongodb.MockMongoFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.openrdf.model.Resource;
+import org.openrdf.model.Statement;
+import org.openrdf.model.URI;
+import org.openrdf.model.Value;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.model.impl.StatementImpl;
+import org.openrdf.model.impl.ValueFactoryImpl;
+import org.openrdf.query.BindingSet;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+
+import com.mongodb.MongoClient;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.io.ParseException;
+import com.vividsolutions.jts.io.WKTReader;
+import com.vividsolutions.jts.io.WKTWriter;
+
+public class MongoGeoIndexerFilterIT {
+private static final GeometryFactory GF = new GeometryFactory();
+private static final Geometry WASHINGTON_MONUMENT = GF.createPoint(new 
Coordinate(38.8895, 77.0353));
+private static final Geometry LINCOLN_MEMORIAL = GF.createPoint(new 
Coordinate(38.8893, 77.0502));
+private static final Geometry CAPITAL_BUILDING = GF.createPoint(new 
Coordinate(38.8899, 77.0091));
+private static final Geometry WHITE_HOUSE = GF.createPoint(new 
Coordinate(38.8977, 77.0365));
+
+private MongoClient client;
+private Sail sail;
+private SailRepositoryConnection conn;
+
+@Before
+public void before() throws Exception {
+final MongoIndexingConfiguration indxrConf = 
MongoIndexingConfiguration.builder()
+.setMongoCollectionPrefix("rya_")
+.setMongoDBName("indexerTests")
+.setUseMongoFreetextIndex(false)
+.setUseMongoTemporalIndex(false)
+.build();
+
+client = MockMongoFactory.newFactory().newMongoClient();
+indxrConf.setBoolean(OptionalConfigUtils.USE_GEO, true);
+indxrConf.set(ConfigUtils.GEO_PREDICATES_LIST, 
"http://www.opengis.net/ont/geosparql#asWKT;);
+indxrConf.setBoolean(ConfigUtils.USE_MONGO, true);
+indxrConf.setMongoClient(client);
+
+sail = GeoRyaSailFactory.getInstance(indxrConf);
+conn = new SailRepository(sail).getConnection();
+conn.begin();
+}
+
+@Test
+public void nearHappyUsesTest() throws Exception {
+populateRya();
+
+//Only captial
+String query =
+ "PREFIX geo: \n"
+   + "PREFIX geof: 
\n"
+   + "SELECT * \n" //
+   + "WHERE { \n"
+ 

[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129984814
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/GeoIndexer.java ---
@@ -182,4 +183,25 @@
 * @return
 */
public abstract CloseableIteration 
queryOverlaps(Geometry query, StatementConstraints contraints);
+   
+/**
+ * Returns statements that contain a geometry that is near the queried 
{@link Geometry} and meet the {@link StatementConstraints}.
+ * 
+ * A geometry is considered near if it within the min/max distances 
specified in the provided {@link NearQuery}.  This will make a disc (specify 
max),
+ *  a donut(specify both), or a spheroid complement disc (specify min)
+ * To specify max/min distances:
+ * 
+ * Enter parameters in order MAX, MIN -- Donut
+ * Omit the MIN -- Disc
+ * Enter 0 for MAX, and Enter parameter for MIN -- Spheroid 
complement Dist
+ * Omit both -- Default max/min [TODO: Find these values]
--- End diff --

meter, still no idea what the default is


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129984776
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java
 ---
@@ -127,8 +128,9 @@ public String getTableName() {
 
 @Override
 public void deleteStatement(final RyaStatement stmt) throws 
IOException {
-   final DBObject obj = storageStrategy.getQuery(stmt);
-   collection.remove(obj);
--- End diff --

woops.  used it initially to verify that remove was actually working.  
removed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129984635
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/accumulo/geo/GeoTupleSet.java
 ---
@@ -349,6 +371,100 @@ public String toString() {
 };
 };
 
+private final SearchFunction GEO_NEAR = new SearchFunction() {
+@Override
+public CloseableIteration 
performSearch(final String queryText,
+final StatementConstraints contraints) throws 
QueryEvaluationException {
+try {
+final String[] args = queryText.split(NEAR_DELIM);
+Optional maxDistanceOpt = Optional.empty();
+Optional minDistanceOpt = Optional.empty();
+final String query = args[0];
+
+for (int ii = 1; ii < args.length; ii++) {
+String numArg = args[ii];
+
+// remove pre-padding 0's since 
NumberUtils.isNumber()
+// will assume its octal if it starts with a 0.
+while (numArg.startsWith("0")) {
+numArg = numArg.substring(1);
+}
+// was 0
+if (numArg.equals("")) {
+// if max hasn't been set, set it to 0.
+// Otherwise, min is just ignored.
+if (!maxDistanceOpt.isPresent()) {
+maxDistanceOpt = Optional.of(0.0);
+}
+} else {
+if (!maxDistanceOpt.isPresent() && 
NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+maxDistanceOpt = getDistanceOpt(numArg, 
"maxDistance");
+} else if (NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+minDistanceOpt = getDistanceOpt(numArg, 
"minDistance");
+} else {
+throw new IllegalArgumentException(numArg 
+ " is not a valid Near function argument.");
+}
+}
+}
+final WKTReader reader = new WKTReader();
+final Geometry geometry = reader.read(query);
+final NearQuery nearQuery = new 
NearQuery(maxDistanceOpt, minDistanceOpt, geometry);
+return geoIndexer.queryNear(nearQuery, contraints);
+} catch (final ParseException e) {
+throw new QueryEvaluationException(e);
+}
+}
+
+private Optional getDistanceOpt(final String num, 
final String name) {
+try {
+return Optional.of(Double.parseDouble(num));
+} catch (final NumberFormatException nfe) {
--- End diff --

I'll do a quick test for it, if it doesn't break I don't see why we should 
do anything.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread isper3at
Github user isper3at commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129983982
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/mongodb/geo/GeoMongoDBStorageStrategy.java
 ---
@@ -90,15 +113,18 @@ public GeoMongoDBStorageStrategy(final double 
maxDistance) {
 
 @Override
 public void createIndices(final DBCollection coll){
-coll.createIndex("{" + GEO + " : \"2dsphere\"" );
--- End diff --

presumably yes, but it didn't really work either.  the BasicDBObject worked 
though


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/295/Build
 result: ABORTED[...truncated 7.06 MB...][INFO] Copying 3 
resources[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ 
rya.pcj.fluo.demo ---[INFO] Changes detected - recompiling the module![INFO] 
Compiling 3 source files to 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pcj.fluo.demo/target/classes[WARNING]
 Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ 
rya.pcj.fluo.demo ---[INFO] Using 'UTF-8' encoding to copy filtered 
resources.[INFO] skip non existing resourceDirectory /home/jenkins/j
 
enkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pcj.fluo.demo/src/test/resources[INFO]
 Copying 3 resourcesBuild was aborted[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ 
rya.pcj.fluo.demo ---[INFO] No sources to compilechannel stopped[WARNING] 
Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
hudson.remoting.Channel$OrderlyShutdown[INFO] [INFO] --- 
maven-surefire-plugin:2.18.1:test (default-test) @ rya.pcj.fluo.demo ---Setting 
status of f12f54690204c9cc154aa91833c15f51e22cc09c to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/295/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread meiercaleb
Github user meiercaleb commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129949331
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/mongodb/geo/GeoMongoDBStorageStrategy.java
 ---
@@ -90,15 +113,18 @@ public GeoMongoDBStorageStrategy(final double 
maxDistance) {
 
 @Override
 public void createIndices(final DBCollection coll){
-coll.createIndex("{" + GEO + " : \"2dsphere\"" );
--- End diff --

What was the issue here?  We were missing "}" after 2dsphere?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread meiercaleb
Github user meiercaleb commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129955663
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/GeoIndexer.java ---
@@ -182,4 +183,25 @@
 * @return
 */
public abstract CloseableIteration 
queryOverlaps(Geometry query, StatementConstraints contraints);
+   
+/**
+ * Returns statements that contain a geometry that is near the queried 
{@link Geometry} and meet the {@link StatementConstraints}.
+ * 
+ * A geometry is considered near if it within the min/max distances 
specified in the provided {@link NearQuery}.  This will make a disc (specify 
max),
+ *  a donut(specify both), or a spheroid complement disc (specify min)
+ * To specify max/min distances:
+ * 
+ * Enter parameters in order MAX, MIN -- Donut
+ * Omit the MIN -- Disc
+ * Enter 0 for MAX, and Enter parameter for MIN -- Spheroid 
complement Dist
+ * Omit both -- Default max/min [TODO: Find these values]
--- End diff --

What is the unit of measurement here?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread meiercaleb
Github user meiercaleb commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129947290
  
--- Diff: 
extras/rya.geoindexing/src/main/java/org/apache/rya/indexing/accumulo/geo/GeoTupleSet.java
 ---
@@ -349,6 +371,100 @@ public String toString() {
 };
 };
 
+private final SearchFunction GEO_NEAR = new SearchFunction() {
+@Override
+public CloseableIteration 
performSearch(final String queryText,
+final StatementConstraints contraints) throws 
QueryEvaluationException {
+try {
+final String[] args = queryText.split(NEAR_DELIM);
+Optional maxDistanceOpt = Optional.empty();
+Optional minDistanceOpt = Optional.empty();
+final String query = args[0];
+
+for (int ii = 1; ii < args.length; ii++) {
+String numArg = args[ii];
+
+// remove pre-padding 0's since 
NumberUtils.isNumber()
+// will assume its octal if it starts with a 0.
+while (numArg.startsWith("0")) {
+numArg = numArg.substring(1);
+}
+// was 0
+if (numArg.equals("")) {
+// if max hasn't been set, set it to 0.
+// Otherwise, min is just ignored.
+if (!maxDistanceOpt.isPresent()) {
+maxDistanceOpt = Optional.of(0.0);
+}
+} else {
+if (!maxDistanceOpt.isPresent() && 
NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+maxDistanceOpt = getDistanceOpt(numArg, 
"maxDistance");
+} else if (NumberUtils.isNumber(numArg)) {
+// no variable identifier, going by order.
+minDistanceOpt = getDistanceOpt(numArg, 
"minDistance");
+} else {
+throw new IllegalArgumentException(numArg 
+ " is not a valid Near function argument.");
+}
+}
+}
+final WKTReader reader = new WKTReader();
+final Geometry geometry = reader.read(query);
+final NearQuery nearQuery = new 
NearQuery(maxDistanceOpt, minDistanceOpt, geometry);
+return geoIndexer.queryNear(nearQuery, contraints);
+} catch (final ParseException e) {
+throw new QueryEvaluationException(e);
+}
+}
+
+private Optional getDistanceOpt(final String num, 
final String name) {
+try {
+return Optional.of(Double.parseDouble(num));
+} catch (final NumberFormatException nfe) {
--- End diff --

Where are you checking to guard against your radii being negative?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread meiercaleb
Github user meiercaleb commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129944714
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java
 ---
@@ -127,8 +128,9 @@ public String getTableName() {
 
 @Override
 public void deleteStatement(final RyaStatement stmt) throws 
IOException {
-   final DBObject obj = storageStrategy.getQuery(stmt);
-   collection.remove(obj);
--- End diff --

What's the purpose calling wr.getN()?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread meiercaleb
Github user meiercaleb commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/187#discussion_r129956030
  
--- Diff: 
extras/rya.geoindexing/src/test/java/org/apache/rya/indexing/mongo/MongoGeoIndexerFilterIT.java
 ---
@@ -0,0 +1,266 @@
+/*
+ * 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.indexing.mongo;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.resolver.RdfToRyaConversions;
+import org.apache.rya.api.resolver.RyaToRdfConversions;
+import org.apache.rya.indexing.GeoConstants;
+import org.apache.rya.indexing.GeoRyaSailFactory;
+import org.apache.rya.indexing.OptionalConfigUtils;
+import org.apache.rya.indexing.accumulo.ConfigUtils;
+import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
+import org.apache.rya.mongodb.MockMongoFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.openrdf.model.Resource;
+import org.openrdf.model.Statement;
+import org.openrdf.model.URI;
+import org.openrdf.model.Value;
+import org.openrdf.model.ValueFactory;
+import org.openrdf.model.impl.StatementImpl;
+import org.openrdf.model.impl.ValueFactoryImpl;
+import org.openrdf.query.BindingSet;
+import org.openrdf.query.MalformedQueryException;
+import org.openrdf.query.QueryEvaluationException;
+import org.openrdf.query.QueryLanguage;
+import org.openrdf.query.TupleQueryResult;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.repository.sail.SailRepositoryConnection;
+import org.openrdf.sail.Sail;
+
+import com.mongodb.MongoClient;
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.io.ParseException;
+import com.vividsolutions.jts.io.WKTReader;
+import com.vividsolutions.jts.io.WKTWriter;
+
+public class MongoGeoIndexerFilterIT {
+private static final GeometryFactory GF = new GeometryFactory();
+private static final Geometry WASHINGTON_MONUMENT = GF.createPoint(new 
Coordinate(38.8895, 77.0353));
+private static final Geometry LINCOLN_MEMORIAL = GF.createPoint(new 
Coordinate(38.8893, 77.0502));
+private static final Geometry CAPITAL_BUILDING = GF.createPoint(new 
Coordinate(38.8899, 77.0091));
+private static final Geometry WHITE_HOUSE = GF.createPoint(new 
Coordinate(38.8977, 77.0365));
+
+private MongoClient client;
+private Sail sail;
+private SailRepositoryConnection conn;
+
+@Before
+public void before() throws Exception {
+final MongoIndexingConfiguration indxrConf = 
MongoIndexingConfiguration.builder()
+.setMongoCollectionPrefix("rya_")
+.setMongoDBName("indexerTests")
+.setUseMongoFreetextIndex(false)
+.setUseMongoTemporalIndex(false)
+.build();
+
+client = MockMongoFactory.newFactory().newMongoClient();
+indxrConf.setBoolean(OptionalConfigUtils.USE_GEO, true);
+indxrConf.set(ConfigUtils.GEO_PREDICATES_LIST, 
"http://www.opengis.net/ont/geosparql#asWKT;);
+indxrConf.setBoolean(ConfigUtils.USE_MONGO, true);
+indxrConf.setMongoClient(client);
+
+sail = GeoRyaSailFactory.getInstance(indxrConf);
+conn = new SailRepository(sail).getConnection();
+conn.begin();
+}
+
+@Test
+public void nearHappyUsesTest() throws Exception {
+populateRya();
+
+//Only captial
+String query =
+ "PREFIX geo: \n"
+   + "PREFIX geof: 
\n"
+   + "SELECT * \n" //
+   + "WHERE { \n"
+   

[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


Github user asfgit commented on the issue:

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

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/292/



> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #188: RYA-318 Rya Shell improvements for packaging, load...

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/292/



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/187
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/294/Build
 result: FAILURE[...truncated 6.53 MB...][INFO] 
[INFO] 
BUILD FAILURE[INFO] 
[INFO] 
Total time: 30:12 min[INFO] Finished at: 2017-07-27T20:16:18+00:00[INFO] Final 
Memory: 150M/1094M[INFO] 
[ERROR] 
Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:integration-test 
(default) on project rya.pcj.fluo.integration: Execution default of goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:integration-test failed: 
The forked VM terminated without properly saying goodbye. VM crash or 
System.exit called?[ERROR] Command was /bin/sh -c cd 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pc
 j.fluo.integration && /usr/local/asfpackages/java/jdk1.8.0_144/jre/bin/java 
-jar 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pcj.fluo.integration/target/surefire/surefirebooter6966476237704401947.jar
 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pcj.fluo.integration/target/surefire/surefire302952478541069939tmp
 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.pcj.fluo/pcj.fluo.integration/target/surefire/surefire_6834138871477277758tmp[ERROR]
 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run 
Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable 
full debug logging.[ERROR] [ERROR] For more information about the errors and 
possible solutions, please read the following articles:[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionExceptio
 n[ERROR] [ERROR] After correcting the problems, you can resume the build with 
the command[ERROR]   mvn  -rf :rya.pcj.fluo.integrationchannel 
stoppedSetting status of f12f54690204c9cc154aa91833c15f51e22cc09c to FAILURE 
with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/294/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-303) Mongo PCJ indexer support

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-303:


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

https://github.com/apache/incubator-rya/pull/172#discussion_r129946427
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/pcj/BasePcjIndexer.java
 ---
@@ -0,0 +1,138 @@
+/*
+ * 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.indexing.mongodb.pcj;
+
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Collections.singleton;
+import static java.util.Objects.requireNonNull;
+import static java.util.stream.Collectors.groupingBy;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.indexing.entity.model.Entity;
+import org.apache.rya.indexing.entity.storage.EntityStorage;
+import 
org.apache.rya.indexing.entity.storage.EntityStorage.EntityStorageException;
+import org.apache.rya.indexing.pcj.storage.mongo.MongoPcjDocuments;
+import org.apache.rya.mongodb.MongoDBRdfConfiguration;
+import org.apache.rya.mongodb.MongoSecondaryIndex;
+import org.openrdf.model.URI;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * A base class that may be used to update an {@link EntityStorage} as new
+ * {@link RyaStatement}s are added to/removed from the Rya instance.
+ */
+@DefaultAnnotation(NonNull.class)
+public abstract class BasePcjIndexer implements PcjIndexer, 
MongoSecondaryIndex {
+
+private final AtomicReference configuration = 
new AtomicReference<>();
+private final AtomicReference pcjDocs = new 
AtomicReference<>();
+
+@Override
+public void setConf(final Configuration conf) {
+requireNonNull(conf);
+pcjDocs.set( getPcjStorage(conf) );
+}
+
+@Override
+public Configuration getConf() {
+return configuration.get();
+}
+
+@Override
+public void storeStatement(final RyaStatement statement) throws 
IOException {
+requireNonNull(statement);
+storeStatements( singleton(statement) );
+}
+
+@Override
+public void storeStatements(final Collection statements) 
throws IOException {
+requireNonNull(statements);
+
+final Map groupedBySubject = 
statements.stream()
+.collect(groupingBy(RyaStatement::getSubject));
+
+for(final Entry entry : 
groupedBySubject.entrySet()) {
+try {
+updateEntity(entry.getKey(), entry.getValue());
+} catch (final EntityStorageException e) {
+throw new IOException("Failed to update the Entity 
index.", e);
+}
+}
+}
+
+/**
+ * Updates a {@link Entity} to reflect new {@link RyaStatement}s.
+ *
+ * @param subject - The Subject of the {@link Entity} the statements 
are for. (not null)
+ * @param statements - Statements that the {@link Entity} will be 
updated with. (not null)
+ */
+private void updateEntity(final RyaURI subject, final 
Collection statements) throws EntityStorageException {
+requireNonNull(subject);
--- End diff --

May want to change the name of this method -- Entity doesn't make sense in 
a pcj context.  


> Mongo PCJ indexer support
> -
>
> Key: RYA-303
> 

[GitHub] incubator-rya pull request #172: RYA-303 Mongo PCJ Support

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/172#discussion_r129946427
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/pcj/BasePcjIndexer.java
 ---
@@ -0,0 +1,138 @@
+/*
+ * 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.indexing.mongodb.pcj;
+
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Collections.singleton;
+import static java.util.Objects.requireNonNull;
+import static java.util.stream.Collectors.groupingBy;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.indexing.entity.model.Entity;
+import org.apache.rya.indexing.entity.storage.EntityStorage;
+import 
org.apache.rya.indexing.entity.storage.EntityStorage.EntityStorageException;
+import org.apache.rya.indexing.pcj.storage.mongo.MongoPcjDocuments;
+import org.apache.rya.mongodb.MongoDBRdfConfiguration;
+import org.apache.rya.mongodb.MongoSecondaryIndex;
+import org.openrdf.model.URI;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * A base class that may be used to update an {@link EntityStorage} as new
+ * {@link RyaStatement}s are added to/removed from the Rya instance.
+ */
+@DefaultAnnotation(NonNull.class)
+public abstract class BasePcjIndexer implements PcjIndexer, 
MongoSecondaryIndex {
+
+private final AtomicReference configuration = 
new AtomicReference<>();
+private final AtomicReference pcjDocs = new 
AtomicReference<>();
+
+@Override
+public void setConf(final Configuration conf) {
+requireNonNull(conf);
+pcjDocs.set( getPcjStorage(conf) );
+}
+
+@Override
+public Configuration getConf() {
+return configuration.get();
+}
+
+@Override
+public void storeStatement(final RyaStatement statement) throws 
IOException {
+requireNonNull(statement);
+storeStatements( singleton(statement) );
+}
+
+@Override
+public void storeStatements(final Collection statements) 
throws IOException {
+requireNonNull(statements);
+
+final Map groupedBySubject = 
statements.stream()
+.collect(groupingBy(RyaStatement::getSubject));
+
+for(final Entry entry : 
groupedBySubject.entrySet()) {
+try {
+updateEntity(entry.getKey(), entry.getValue());
+} catch (final EntityStorageException e) {
+throw new IOException("Failed to update the Entity 
index.", e);
+}
+}
+}
+
+/**
+ * Updates a {@link Entity} to reflect new {@link RyaStatement}s.
+ *
+ * @param subject - The Subject of the {@link Entity} the statements 
are for. (not null)
+ * @param statements - Statements that the {@link Entity} will be 
updated with. (not null)
+ */
+private void updateEntity(final RyaURI subject, final 
Collection statements) throws EntityStorageException {
+requireNonNull(subject);
--- End diff --

May want to change the name of this method -- Entity doesn't make sense in 
a pcj context.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-303) Mongo PCJ indexer support

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-303:


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

https://github.com/apache/incubator-rya/pull/172#discussion_r129946162
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/pcj/BasePcjIndexer.java
 ---
@@ -0,0 +1,138 @@
+/*
+ * 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.indexing.mongodb.pcj;
+
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Collections.singleton;
+import static java.util.Objects.requireNonNull;
+import static java.util.stream.Collectors.groupingBy;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.indexing.entity.model.Entity;
+import org.apache.rya.indexing.entity.storage.EntityStorage;
+import 
org.apache.rya.indexing.entity.storage.EntityStorage.EntityStorageException;
+import org.apache.rya.indexing.pcj.storage.mongo.MongoPcjDocuments;
+import org.apache.rya.mongodb.MongoDBRdfConfiguration;
+import org.apache.rya.mongodb.MongoSecondaryIndex;
+import org.openrdf.model.URI;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * A base class that may be used to update an {@link EntityStorage} as new
+ * {@link RyaStatement}s are added to/removed from the Rya instance.
+ */
+@DefaultAnnotation(NonNull.class)
+public abstract class BasePcjIndexer implements PcjIndexer, 
MongoSecondaryIndex {
+
+private final AtomicReference configuration = 
new AtomicReference<>();
+private final AtomicReference pcjDocs = new 
AtomicReference<>();
+
+@Override
+public void setConf(final Configuration conf) {
+requireNonNull(conf);
+pcjDocs.set( getPcjStorage(conf) );
+}
+
+@Override
+public Configuration getConf() {
+return configuration.get();
+}
+
+@Override
+public void storeStatement(final RyaStatement statement) throws 
IOException {
+requireNonNull(statement);
+storeStatements( singleton(statement) );
+}
+
+@Override
+public void storeStatements(final Collection statements) 
throws IOException {
+requireNonNull(statements);
--- End diff --

Is this right?  Looks like a copy and paste from the entity index.  


> Mongo PCJ indexer support
> -
>
> Key: RYA-303
> URL: https://issues.apache.org/jira/browse/RYA-303
> Project: Rya
>  Issue Type: Improvement
>Reporter: Andrew Smith
>Assignee: Andrew Smith
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #172: RYA-303 Mongo PCJ Support

2017-07-27 Thread pujav65
Github user pujav65 commented on a diff in the pull request:

https://github.com/apache/incubator-rya/pull/172#discussion_r129946162
  
--- Diff: 
extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/pcj/BasePcjIndexer.java
 ---
@@ -0,0 +1,138 @@
+/*
+ * 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.indexing.mongodb.pcj;
+
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Collections.singleton;
+import static java.util.Objects.requireNonNull;
+import static java.util.stream.Collectors.groupingBy;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.rya.api.domain.RyaStatement;
+import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.indexing.entity.model.Entity;
+import org.apache.rya.indexing.entity.storage.EntityStorage;
+import 
org.apache.rya.indexing.entity.storage.EntityStorage.EntityStorageException;
+import org.apache.rya.indexing.pcj.storage.mongo.MongoPcjDocuments;
+import org.apache.rya.mongodb.MongoDBRdfConfiguration;
+import org.apache.rya.mongodb.MongoSecondaryIndex;
+import org.openrdf.model.URI;
+
+import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
+import edu.umd.cs.findbugs.annotations.NonNull;
+
+/**
+ * A base class that may be used to update an {@link EntityStorage} as new
+ * {@link RyaStatement}s are added to/removed from the Rya instance.
+ */
+@DefaultAnnotation(NonNull.class)
+public abstract class BasePcjIndexer implements PcjIndexer, 
MongoSecondaryIndex {
+
+private final AtomicReference configuration = 
new AtomicReference<>();
+private final AtomicReference pcjDocs = new 
AtomicReference<>();
+
+@Override
+public void setConf(final Configuration conf) {
+requireNonNull(conf);
+pcjDocs.set( getPcjStorage(conf) );
+}
+
+@Override
+public Configuration getConf() {
+return configuration.get();
+}
+
+@Override
+public void storeStatement(final RyaStatement statement) throws 
IOException {
+requireNonNull(statement);
+storeStatements( singleton(statement) );
+}
+
+@Override
+public void storeStatements(final Collection statements) 
throws IOException {
+requireNonNull(statements);
--- End diff --

Is this right?  Looks like a copy and paste from the entity index.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #183: RYA-323 Enabling Multi Var Geo Functions. Closes #...

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
checking build and will then merge


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-323) Enable Multi Var Geo Functions

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-323:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/183
  
checking build and will then merge


> Enable Multi Var Geo Functions
> --
>
> Key: RYA-323
> URL: https://issues.apache.org/jira/browse/RYA-323
> Project: Rya
>  Issue Type: Improvement
>  Components: sail
>Reporter: Aaron Mihalik
>Assignee: Aaron Mihalik
>
> Currently, all Rya GeoSPARQL functions must have at least one parameter as a 
> constant, eg:
> {code}
>   ?point geo:asWKT ?wkt .
>   FILTER(geof:sfWithin(?wkt, "POLYGON(( ... ))"^^geo:wktLiteral)) 
> {code}
> however, there is no good reason for this.  In fact, we will later want to 
> support functions that take in two variables.  For instance, a previous set 
> of statement patterns will resolve a wkt, then I want to pass that wkt value 
> into the function, eg:
> {code}
> ?point .
>   ?point geo:asWKT ?wkt1 .
>   ?point geo:asWKT ?wkt2 .
>   FILTER(geof:near(?wkt2, ?wkt1)) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/187
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/293/Build
 result: FAILURE[...truncated 899.88 KB...][INFO] 
[INFO] 
BUILD FAILURE[INFO] 
[INFO] 
Total time: 02:36 min[INFO] Finished at: 2017-07-27T19:41:13+00:00[INFO] Final 
Memory: 80M/810M[INFO] 
[ERROR] 
Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on 
project rya.prospector: Execution default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: The forked 
VM terminated without properly saying goodbye. VM crash or System.exit 
called?[ERROR] Command was /bin/sh -c cd 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.prospector
 && /usr/local/asfpackage
 s/java/jdk1.8.0_144/jre/bin/java -Dfile.encoding=UTF-8 -jar 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.prospector/target/surefire/surefirebooter9199985931916567775.jar
 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.prospector/target/surefire/surefire2231593840200276260tmp
 
/home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.prospector/target/surefire/surefire_47864515070306959272tmp[ERROR]
 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run 
Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable 
full debug logging.[ERROR] [ERROR] For more information about the errors and 
possible solutions, please read the following articles:[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException[ERROR]
 [ERROR] After correcting the problems, you can resume the build wit
 h the command[ERROR]   mvn  -rf :rya.prospectorchannel stoppedSetting 
status of f12f54690204c9cc154aa91833c15f51e22cc09c to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/293/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/291/Build
 result: ABORTED[...truncated 7.07 MB...][INFO] 
[INFO] 
Building Apache Rya PCJ Fluo Demo 3.2.11-incubating-SNAPSHOT[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (check-licenses) @ rya.pcj.fluo.demo 
---[INFO] 51 implicit excludes (use -debug for more details).[INFO] Exclude: 
**/resources/META-INF/services/**Build was abortedAborted by mihalik[INFO] 4 
resources included (use -debug for more details)channel stopped[INFO] Rat 
check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 4 
licenc
 e.[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.io.IOException: Backing channel 'channel' is disconnected.[INFO] [INFO] 
--- maven-enforcer-plugin:1.3.1:enforce (enforce-mvn) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.io.IOException: Backing channel 'channel' is disconnected.[INFO] [INFO] 
--- maven-remote-resources-plugin:1.5:process (default) @ rya.pcj.fluo.demo 
---Setting status of 92cc2262fd1bb3dd79284518126431c730104353 to FAILURE with 
url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/291/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


Github user jdasch commented on the issue:

https://github.com/apache/incubator-rya/pull/188
  
asfbot build


> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #188: RYA-318 Rya Shell improvements for packaging, load...

2017-07-27 Thread jdasch
Github user jdasch commented on the issue:

https://github.com/apache/incubator-rya/pull/188
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #188: RYA-318 Rya Shell improvements for packaging, load...

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/287/Build
 result: ABORTED[...truncated 6.29 MB...][INFO] 
[INFO] 
Building Apache Rya PCJ Fluo Demo 3.2.11-incubating-SNAPSHOT[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (check-licenses) @ rya.pcj.fluo.demo 
---[INFO] 51 implicit excludes (use -debug for more details).[INFO] Exclude: 
**/resources/META-INF/services/**[INFO] 4 resources included (use -debug for 
more details)[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 
generated: 0 approved: 4 licence.[WARNING] Failed to notify spy 
hudson.maven.Mave
 n3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid 
object ID 12 iota=55[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce 
(enforce-mvn) @ rya.pcj.fluo.demo ---[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
rya.pcj.fluo.demo ---Build was abortedAborted by mihalikchannel stoppedSetting 
status of 6b669be91fad503c3a5977425959e04daab33737 to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/287/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-266) Temporal index fails to write when using non-mock accumulo

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-266:


Github user asfgit commented on the issue:

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

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/289/Failed
 Tests: 2incubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.indexing.example:
 1ExamplesTest.RyaDirectExampleTestincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.pcj.fluo.integration:
 1org.apache.rya.indexing.pcj.fluo.integration.KafkaExportIT.embeddedKafkaTest



> Temporal index fails to write when using non-mock accumulo
> --
>
> Key: RYA-266
> URL: https://issues.apache.org/jira/browse/RYA-266
> Project: Rya
>  Issue Type: Sub-task
>  Components: dao, sail
> Environment: indexing
>Reporter: David W. Lotts
>Assignee: David W. Lotts
>Priority: Blocker
>  Labels: flush, index, temporal
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Temporal indexing writes nothing to it's table name: [prefix]temporal.
> It does seem to work for a mock instance.  It might also work for a large 
> ingest since it would force a flush.
> See the parent RYA-72 for an explanation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #149: RYA-266 Added calls to init() where-ever the Accum...

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/289/Failed
 Tests: 2incubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.indexing.example:
 1ExamplesTest.RyaDirectExampleTestincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.pcj.fluo.integration:
 1org.apache.rya.indexing.pcj.fluo.integration.KafkaExportIT.embeddedKafkaTest



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/187
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/288/Build
 result: ABORTED[...truncated 6.53 MB...][INFO] 
[INFO] 
Building Apache Rya PCJ Fluo Demo 3.2.11-incubating-SNAPSHOT[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (check-licenses) @ rya.pcj.fluo.demo 
---[INFO] 51 implicit excludes (use -debug for more details).[INFO] Exclude: 
**/resources/META-INF/services/**[INFO] 4 resources included (use -debug for 
more details)[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 
generated: 0 approved: 4 licence.Build was abortedAborted by mihalik[WARNING] 
Fai
 led to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-mvn) @ 
rya.pcj.fluo.demo ---channel stopped[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
hudson.remoting.Channel$OrderlyShutdown[INFO] [INFO] --- 
maven-remote-resources-plugin:1.5:process (default) @ rya.pcj.fluo.demo 
---Setting status of 0ca7597ff4d0c85a7f233bb1746cf401a81f6725 to FAILURE with 
url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/288/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #149: RYA-266 Added calls to init() where-ever the Accum...

2017-07-27 Thread pujav65
Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/149
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-266) Temporal index fails to write when using non-mock accumulo

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-266:


Github user pujav65 commented on the issue:

https://github.com/apache/incubator-rya/pull/149
  
asfbot build


> Temporal index fails to write when using non-mock accumulo
> --
>
> Key: RYA-266
> URL: https://issues.apache.org/jira/browse/RYA-266
> Project: Rya
>  Issue Type: Sub-task
>  Components: dao, sail
> Environment: indexing
>Reporter: David W. Lotts
>Assignee: David W. Lotts
>Priority: Blocker
>  Labels: flush, index, temporal
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Temporal indexing writes nothing to it's table name: [prefix]temporal.
> It does seem to work for a mock instance.  It might also work for a large 
> ingest since it would force a flush.
> See the parent RYA-72 for an explanation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/187
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/286/Build
 result: ABORTED[...truncated 6.52 MB...][INFO] 
[INFO] 
Building Apache Rya PCJ Fluo Demo 3.2.11-incubating-SNAPSHOT[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (check-licenses) @ rya.pcj.fluo.demo 
---[INFO] 51 implicit excludes (use -debug for more details).[INFO] Exclude: 
**/resources/META-INF/services/**[INFO] 4 resources included (use -debug for 
more details)[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 
generated: 0 approved: 4 licence.[WARNING] Failed to notify spy 
hudson.maven.Mave
 n3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid 
object ID 12 iota=55[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce 
(enforce-mvn) @ rya.pcj.fluo.demo ---Build was abortedAborted by 
mihalik[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
rya.pcj.fluo.demo ---channel stoppedSetting status of 
0ca7597ff4d0c85a7f233bb1746cf401a81f6725 to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/286/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell

2017-07-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on RYA-318:


GitHub user jdasch opened a pull request:

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

RYA-318 Rya Shell improvements for packaging, loading and querying.


## Description
>What Changed?
- Linked in the ability to load RDF statement data from file.  Modified 
default behavior to not flush on every statement.
- Added the ability to perform sparql queries from the shell, either by 
reading in a query file, or by typing in a new multi-line query (similar to 
what you'd have in mysql/psql).
- Improved packaging so this is a distributable application (*-bin.tar.gz) 
that can be installed on a system and made available on a users $PATH, such 
that they only need to type the command "rya" to launch a shell.
- added the ability to install a rya instance from a script.
- Added user configurable logging to simplify difficult to debug/diagnose 
nested exceptions that may not get reported to the user as the top level 
exception message.
- added an example script for creating a rya instance and running a lubm 
benchmark.  Omitted rdf and queries due to licensing concerns.

### Tests
Added RyaCommandsTest.java
Updated RyaAdminCommandsTest.java to support code changes and improved 
coverage of added features.
Updated RyaConnectionCommandsIT.java, AccumuloLoadStatementsFileIT.java, to 
support method signature changes.

### Links
[Jira](https://issues.apache.org/jira/browse/RYA-318)

### Checklist
- [ ] Code Review
- [ ] Squash Commits

 People To Reivew
@amihalik 
@meiercaleb 



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

$ git pull https://github.com/jdasch/incubator-rya RYA-318

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

https://github.com/apache/incubator-rya/pull/188.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 #188


commit 6b669be91fad503c3a5977425959e04daab33737
Author: jdasch 
Date:   2017-07-27T15:00:52Z

RYA-318 Rya Shell improvements for packaging, loading and querying.




> Add Loading Data and Executing SPARQL Queries to the Rya Shell
> --
>
> Key: RYA-318
> URL: https://issues.apache.org/jira/browse/RYA-318
> Project: Rya
>  Issue Type: Sub-task
>  Components: clients
>Reporter: Jeff Dasch
>Assignee: Jeff Dasch
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #188: RYA-318 Rya Shell improvements for packagin...

2017-07-27 Thread jdasch
GitHub user jdasch opened a pull request:

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

RYA-318 Rya Shell improvements for packaging, loading and querying.


## Description
>What Changed?
- Linked in the ability to load RDF statement data from file.  Modified 
default behavior to not flush on every statement.
- Added the ability to perform sparql queries from the shell, either by 
reading in a query file, or by typing in a new multi-line query (similar to 
what you'd have in mysql/psql).
- Improved packaging so this is a distributable application (*-bin.tar.gz) 
that can be installed on a system and made available on a users $PATH, such 
that they only need to type the command "rya" to launch a shell.
- added the ability to install a rya instance from a script.
- Added user configurable logging to simplify difficult to debug/diagnose 
nested exceptions that may not get reported to the user as the top level 
exception message.
- added an example script for creating a rya instance and running a lubm 
benchmark.  Omitted rdf and queries due to licensing concerns.

### Tests
Added RyaCommandsTest.java
Updated RyaAdminCommandsTest.java to support code changes and improved 
coverage of added features.
Updated RyaConnectionCommandsIT.java, AccumuloLoadStatementsFileIT.java, to 
support method signature changes.

### Links
[Jira](https://issues.apache.org/jira/browse/RYA-318)

### Checklist
- [ ] Code Review
- [ ] Squash Commits

 People To Reivew
@amihalik 
@meiercaleb 



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

$ git pull https://github.com/jdasch/incubator-rya RYA-318

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

https://github.com/apache/incubator-rya/pull/188.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 #188


commit 6b669be91fad503c3a5977425959e04daab33737
Author: jdasch 
Date:   2017-07-27T15:00:52Z

RYA-318 Rya Shell improvements for packaging, loading and querying.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/187
  
asfbot build


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread asfgit
Github user asfgit commented on the issue:

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

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/285/Build
 result: ABORTED[...truncated 7.03 MB...][INFO] 
[INFO] 
Building Apache Rya PCJ Fluo Demo 3.2.11-incubating-SNAPSHOT[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rya.pcj.fluo.demo 
---[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (check-licenses) @ rya.pcj.fluo.demo 
---[INFO] 51 implicit excludes (use -debug for more details).[INFO] Exclude: 
**/resources/META-INF/services/**[INFO] 4 resources included (use -debug for 
more details)[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 
generated: 0 approved: 4 licence.[WARNING] Failed to notify spy 
hudson.maven.Mave
 n3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid 
object ID 12 iota=55[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce 
(enforce-mvn) @ rya.pcj.fluo.demo ---[WARNING] Failed to notify spy 
hudson.maven.Maven3Builder$JenkinsEventSpy: 
java.util.concurrent.ExecutionException: Invalid object ID 12 iota=55[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ 
rya.pcj.fluo.demo ---Build was abortedAborted by mihalikchannel stoppedSetting 
status of 0ca7597ff4d0c85a7f233bb1746cf401a81f6725 to FAILURE with url 
https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/285/
 and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya pull request #187: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
GitHub user amihalik opened a pull request:

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

Rya 317 Added Near function for geo mongodb

(Note this is a continuation of PR #186.  This PR includes additional 
commits that will be squashed)

## Description
>What Changed?
Changed GeoTupleSet to no long always call GeoWithin
Create the Geo Indexer properly
Add GeoNear function for MongoDB and an unsupported exception for accumulo.

### Tests
>Coverage?
Full Near() coverage
added test to ensure delete works on GEO

### Links
[Jira](https://issues.apache.org/jira/browse/RYA-317)

### Checklist
- [ ] Code Review
- [ ] Squash Commits

 People To Reivew
@isper3at @meiercaleb 


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

$ git pull https://github.com/amihalik/incubator-rya RYA-317

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

https://github.com/apache/incubator-rya/pull/187.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 #187


commit 168769a5bec213173f47701ebadda842c11c1092
Author: isper3at 
Date:   2017-07-25T20:15:38Z

RYA-317 Added Mongo Near support

Support for mongo added.
fixed so no longer always calls sfWithin
properly enabled Geo indexer in mongo

commit 0ca7597ff4d0c85a7f233bb1746cf401a81f6725
Author: Aaron Mihalik 
Date:   2017-07-27T14:54:57Z

Build Fix




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #186: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/186
  
@isper3at also: bonus for the use of "spheroid complement disc" 
:1st_place_medal: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-rya issue #186: Rya 317 Added Near function for geo mongodb

2017-07-27 Thread amihalik
Github user amihalik commented on the issue:

https://github.com/apache/incubator-rya/pull/186
  
@isper3at this commit looks good.  I don't have any comments on my initial 
pass.  I'm building and testing this locally right now to see if I have any 
issues with it.

@meiercaleb @isper3at note that this branch has drifted from master and 
therefore won't build.  I cherry-picked the relevant commit (912a1bd), created 
amihalik:RYA-317, and I'm building it on Jenkins 
[here](https://builds.apache.org/job/incubator-rya-fork-with-optionals/20/)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Updated] (RYA-309) GeoSpatial Consistency Bug

2017-07-27 Thread Caleb Meier (JIRA)

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

Caleb Meier updated RYA-309:

Fix Version/s: 3.2.10

> GeoSpatial Consistency Bug
> --
>
> Key: RYA-309
> URL: https://issues.apache.org/jira/browse/RYA-309
> Project: Rya
>  Issue Type: Bug
>  Components: dao
>Affects Versions: 3.2.10
>Reporter: Caleb Meier
>Assignee: Andrew Smith
> Fix For: 3.2.10
>
>
> Docs are not being deleted from the geo index when the associated triple is 
> deleted from the triples collection.  Someone needs to recreate this bug and 
> fix this issue so that the geo index stays consistent with the triples 
> collection.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (RYA-309) GeoSpatial Consistency Bug

2017-07-27 Thread Caleb Meier (JIRA)

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

Caleb Meier closed RYA-309.
---
Resolution: Fixed

> GeoSpatial Consistency Bug
> --
>
> Key: RYA-309
> URL: https://issues.apache.org/jira/browse/RYA-309
> Project: Rya
>  Issue Type: Bug
>  Components: dao
>Affects Versions: 3.2.10
>Reporter: Caleb Meier
>Assignee: Andrew Smith
> Fix For: 3.2.10
>
>
> Docs are not being deleted from the geo index when the associated triple is 
> deleted from the triples collection.  Someone needs to recreate this bug and 
> fix this issue so that the geo index stays consistent with the triples 
> collection.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] incubator-rya pull request #179: RYA-309 Added delete support to indexers

2017-07-27 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---