[jira] [Commented] (RYA-260) Add Aggregation support for Fluo/PCJ app
[ https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15979215#comment-15979215 ] ASF GitHub Bot commented on RYA-260: Github user kchilton2 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/156#discussion_r112754079 --- Diff: extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreatePcj.java --- @@ -82,6 +82,7 @@ */ @DefaultAnnotation(NonNull.class) public class CreatePcj { +private static final Logger log = Logger.getLogger(CreatePcj.class); --- End diff -- Ok, I'm not going to change anything in this review then. > Add Aggregation support for Fluo/PCJ app > > > Key: RYA-260 > URL: https://issues.apache.org/jira/browse/RYA-260 > Project: Rya > Issue Type: New Feature >Reporter: Andrew Smith >Assignee: Kevin Chilton > > A user must be able to submit a PCJ query that contains the following > aggregation functions from SPARQL: > * Sum > * Count > * Average > * Min > * Max > This task does not include any aggregations that appear within a GroupBy > clause. We only need to support queries that have the aggregation within the > SELECT section. > For example, the following query should be processed: > {code} > SELECT (avg(?price) as ?averagePrice) > { > urn:BookA urn:price ?price. > } > {code} > And the following query should not be processed because it requires a group > by: > {code} > SELECT ?title (avg(?price) as ?averagePrice) > { > ?title urn:price ?price. > } > GROUP BY ?title > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-242) Geo function support in Fluo PCJ sparql queries
[ https://issues.apache.org/jira/browse/RYA-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15892515#comment-15892515 ] ASF GitHub Bot commented on RYA-242: GitHub user DLotts opened a pull request: https://github.com/apache/incubator-rya/pull/141 RYA-242_geo_fluo Added 30 geospatial functions wrapping RDF2J functions. Added 30 geospatial functions that can be used with the Fluo Query framework that gives us more Complex Event Processeing capability. This is rolled into its own project because it is is part of the optional geoindexing profile since it is based on JTS/geotools that cannot be depended on by an Apache project because it is LGPL. ### Tests Two test classes: (1) a simple **unit** test that checks that the SPI has loaded the functions. (2) a bunch of **integration** tests that start a single node accumulo/fluo and tests several representative Geospatial functions and one temporal. ### Links [Jira](https://issues.apache.org/jira/browse/RYA-242) ### Checklist - [Please] Code Review - [Done] Squash Commits People To Review [anyone and everyone] You can merge this pull request into a Git repository by running: $ git pull https://github.com/DLotts/incubator-rya RYA-242_geo_fluo Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/141.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 #141 > Geo function support in Fluo PCJ sparql queries > --- > > Key: RYA-242 > URL: https://issues.apache.org/jira/browse/RYA-242 > Project: Rya > Issue Type: New Feature > Environment: Fluo PCJ >Reporter: David W. Lotts >Assignee: David W. Lotts > Labels: CEP, PCJ, geo > > Rya's Fluo pre-computed joins (PCJ) framework along with Kafka sub/pub > gives makes Rya a strong Complex Event Processor (CEP) -- taking streaming > input statements and generating results to subscribed (kafka topics) queries > (PCJ's). > We have identified geo functions as a major enabler for CEP users. > Currently PCJ can handle basic SPARQL filter functions, but not geo functions. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-253) Refactor rya.prospector to use Java instead of Groovy
[ https://issues.apache.org/jira/browse/RYA-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15895086#comment-15895086 ] ASF GitHub Bot commented on RYA-253: GitHub user kchilton2 opened a pull request: https://github.com/apache/incubator-rya/pull/142 RYA-253 Converted the rya.prospector class from Groovy to Java. Also added documentation to the project. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kchilton2/incubator-rya prospector-refactor Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/142.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 #142 commit 5b14ce37999a24c177242f59ac9c72744488378a Author: Kevin ChiltonDate: 2017-03-01T22:42:08Z RYA-253 Converted the rya.prospector class from Groovy to Java. Also added documentation to the project. > Refactor rya.prospector to use Java instead of Groovy > - > > Key: RYA-253 > URL: https://issues.apache.org/jira/browse/RYA-253 > Project: Rya > Issue Type: Bug >Reporter: Kevin Chilton >Assignee: Kevin Chilton > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-255) Provide an example class that demonstrates Prospector.
[ https://issues.apache.org/jira/browse/RYA-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900199#comment-15900199 ] ASF GitHub Bot commented on RYA-255: GitHub user kchilton2 opened a pull request: https://github.com/apache/incubator-rya/pull/144 RYA-255 Provide an example class that demonstrates the Prospector. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kchilton2/incubator-rya RYA-255 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/144.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 #144 commit 5b14ce37999a24c177242f59ac9c72744488378a Author: Kevin ChiltonDate: 2017-03-01T22:42:08Z RYA-253 Converted the rya.prospector class from Groovy to Java. Also added documentation to the project. commit d86be8fa0e7f389fc17e2a80c2c6adec60c9fd02 Author: Kevin Chilton Date: 2017-03-06T22:11:30Z RYA-254 Added a factory method to the ProspectorServiceEvalStatsDAO to make it more convenient to construct. This required moving some of the Accumulo specific configuration parameters into the AccumuloRdfConfiguration object from ConfigUtils. commit 96ee13f495a3263dd05f513e09eebef9b3ce5af9 Author: Kevin Chilton Date: 2017-03-07T21:02:16Z RYA-255 Provide an example class that demonstrates the Prospector. > Provide an example class that demonstrates Prospector. > -- > > Key: RYA-255 > URL: https://issues.apache.org/jira/browse/RYA-255 > Project: Rya > Issue Type: Improvement >Reporter: Kevin Chilton >Assignee: Kevin Chilton > > Create an example class that demonstrates how the Prospector may be used to > build and harvest information about a Rya instance. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-249) Mongo GeoIndexer assumes polygon when performing within
[ https://issues.apache.org/jira/browse/RYA-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15907548#comment-15907548 ] ASF GitHub Bot commented on RYA-249: Github user pujav65 commented on the issue: https://github.com/apache/incubator-rya/pull/140 asfbot build > Mongo GeoIndexer assumes polygon when performing within > --- > > Key: RYA-249 > URL: https://issues.apache.org/jira/browse/RYA-249 > Project: Rya > Issue Type: Bug >Reporter: Andrew Smith >Assignee: Andrew Smith > > Mongo Storage strategy assumes a polygon object is being used when performing > a WITHIN operation. If a polygon is not provided the operation breaks on > mongodb instead of in RYA. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-249) Mongo GeoIndexer assumes polygon when performing within
[ https://issues.apache.org/jira/browse/RYA-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15907598#comment-15907598 ] ASF GitHub Bot commented on RYA-249: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/140 > Mongo GeoIndexer assumes polygon when performing within > --- > > Key: RYA-249 > URL: https://issues.apache.org/jira/browse/RYA-249 > Project: Rya > Issue Type: Bug >Reporter: Andrew Smith >Assignee: Andrew Smith > > Mongo Storage strategy assumes a polygon object is being used when performing > a WITHIN operation. If a polygon is not provided the operation breaks on > mongodb instead of in RYA. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-249) Mongo GeoIndexer assumes polygon when performing within
[ https://issues.apache.org/jira/browse/RYA-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15907547#comment-15907547 ] ASF GitHub Bot commented on RYA-249: Github user pujav65 commented on the issue: https://github.com/apache/incubator-rya/pull/140 looks fine to me. > Mongo GeoIndexer assumes polygon when performing within > --- > > Key: RYA-249 > URL: https://issues.apache.org/jira/browse/RYA-249 > Project: Rya > Issue Type: Bug >Reporter: Andrew Smith >Assignee: Andrew Smith > > Mongo Storage strategy assumes a polygon object is being used when performing > a WITHIN operation. If a polygon is not provided the operation breaks on > mongodb instead of in RYA. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-260) Add Aggregation support for Fluo/PCJ app
[ https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15973552#comment-15973552 ] ASF GitHub Bot commented on RYA-260: GitHub user kchilton2 opened a pull request: https://github.com/apache/incubator-rya/pull/156 RYA-260 Fluo SPARQL Processing Aggregation Support ## Description >What Changed? Added Aggregation support to the Fluo PCJ application. It is a known problem that the Accumulo PCJ Index does not properly handle aggregation output exporting. That should be covered by a new ticket. Also fixed a bunch of resource leaks and changed up how the Fluo integration tests were implemented so that they use the Fluo recipe for Accumulo exporting integration tests. ### Links [Jira](https://issues.apache.org/jira/browse/RYA-260) ### Checklist - [ ] Code Review - [ ] Squash Commits People To Reivew @meiercaleb You can merge this pull request into a Git repository by running: $ git pull https://github.com/kchilton2/incubator-rya RYA-260-fixed Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/156.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 #156 commit 278f6d92fcfe1c68a388b8aa1fcd7ca2134bcfaa Author: Kevin ChiltonDate: 2017-04-07T19:57:57Z RYA-260 Fluo PCJ application has had Aggregation support added to it. Also fixed a bunch of resource leaks that were causing integration tests to fail. > Add Aggregation support for Fluo/PCJ app > > > Key: RYA-260 > URL: https://issues.apache.org/jira/browse/RYA-260 > Project: Rya > Issue Type: New Feature >Reporter: Andrew Smith >Assignee: Kevin Chilton > > A user must be able to submit a PCJ query that contains the following > aggregation functions from SPARQL: > * Sum > * Count > * Average > * Min > * Max > This task does not include any aggregations that appear within a GroupBy > clause. We only need to support queries that have the aggregation within the > SELECT section. > For example, the following query should be processed: > {code} > SELECT (avg(?price) as ?averagePrice) > { > urn:BookA urn:price ?price. > } > {code} > And the following query should not be processed because it requires a group > by: > {code} > SELECT ?title (avg(?price) as ?averagePrice) > { > ?title urn:price ?price. > } > GROUP BY ?title > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-260) Add Aggregation support for Fluo/PCJ app
[ https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15973920#comment-15973920 ] ASF GitHub Bot commented on RYA-260: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/156#discussion_r112089607 --- Diff: extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreatePcj.java --- @@ -82,6 +82,7 @@ */ @DefaultAnnotation(NonNull.class) public class CreatePcj { +private static final Logger log = Logger.getLogger(CreatePcj.class); --- End diff -- not really a review comment, but i think it might behoove(sp?) us to open a ticket to make our logging uniform. > Add Aggregation support for Fluo/PCJ app > > > Key: RYA-260 > URL: https://issues.apache.org/jira/browse/RYA-260 > Project: Rya > Issue Type: New Feature >Reporter: Andrew Smith >Assignee: Kevin Chilton > > A user must be able to submit a PCJ query that contains the following > aggregation functions from SPARQL: > * Sum > * Count > * Average > * Min > * Max > This task does not include any aggregations that appear within a GroupBy > clause. We only need to support queries that have the aggregation within the > SELECT section. > For example, the following query should be processed: > {code} > SELECT (avg(?price) as ?averagePrice) > { > urn:BookA urn:price ?price. > } > {code} > And the following query should not be processed because it requires a group > by: > {code} > SELECT ?title (avg(?price) as ?averagePrice) > { > ?title urn:price ?price. > } > GROUP BY ?title > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-255) Provide an example class that demonstrates Prospector.
[ https://issues.apache.org/jira/browse/RYA-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15973742#comment-15973742 ] ASF GitHub Bot commented on RYA-255: Github user kchilton2 commented on the issue: https://github.com/apache/incubator-rya/pull/144 Once RYA-254 is pulled in, I'll update this pull request. > Provide an example class that demonstrates Prospector. > -- > > Key: RYA-255 > URL: https://issues.apache.org/jira/browse/RYA-255 > Project: Rya > Issue Type: Improvement >Reporter: Kevin Chilton >Assignee: Kevin Chilton > > Create an example class that demonstrates how the Prospector may be used to > build and harvest information about a Rya instance. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-260) Add Aggregation support for Fluo/PCJ app
[ https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15973921#comment-15973921 ] ASF GitHub Bot commented on RYA-260: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/156#discussion_r112101036 --- Diff: extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/VisibilityBindingSetSerde.java --- @@ -0,0 +1,77 @@ +/* + * 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.pcj.fluo.app; + +import static java.util.Objects.requireNonNull; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +import org.apache.fluo.api.data.Bytes; +import org.apache.rya.indexing.pcj.storage.accumulo.VisibilityBindingSet; + +import edu.umd.cs.findbugs.annotations.DefaultAnnotation; +import edu.umd.cs.findbugs.annotations.NonNull; + +/** + * Serializes and deserializes a {@link VisibilityBindingSet} to and from {@link Bytes} objects. + */ +@DefaultAnnotation(NonNull.class) +public class VisibilityBindingSetSerde { --- End diff -- interesting name > Add Aggregation support for Fluo/PCJ app > > > Key: RYA-260 > URL: https://issues.apache.org/jira/browse/RYA-260 > Project: Rya > Issue Type: New Feature >Reporter: Andrew Smith >Assignee: Kevin Chilton > > A user must be able to submit a PCJ query that contains the following > aggregation functions from SPARQL: > * Sum > * Count > * Average > * Min > * Max > This task does not include any aggregations that appear within a GroupBy > clause. We only need to support queries that have the aggregation within the > SELECT section. > For example, the following query should be processed: > {code} > SELECT (avg(?price) as ?averagePrice) > { > urn:BookA urn:price ?price. > } > {code} > And the following query should not be processed because it requires a group > by: > {code} > SELECT ?title (avg(?price) as ?averagePrice) > { > ?title urn:price ?price. > } > GROUP BY ?title > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-260) Add Aggregation support for Fluo/PCJ app
[ https://issues.apache.org/jira/browse/RYA-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15973919#comment-15973919 ] ASF GitHub Bot commented on RYA-260: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/156#discussion_r112089139 --- Diff: extras/indexing/src/main/java/org/apache/rya/api/client/accumulo/AccumuloCreatePCJ.java --- @@ -139,16 +138,15 @@ private void updateFluoApp(final String ryaInstance, final String fluoAppName, f // Connect to the Fluo application that is updating this instance's PCJs. final AccumuloConnectionDetails cd = super.getAccumuloConnectionDetails(); -final FluoClient fluoClient = new FluoClientFactory().connect( +try(final FluoClient fluoClient = new FluoClientFactory().connect( cd.getUsername(), new String(cd.getPassword()), cd.getInstanceName(), cd.getZookeepers(), -fluoAppName); - -// Initialize the PCJ within the Fluo application. -final org.apache.rya.indexing.pcj.fluo.api.CreatePcj fluoCreatePcj = new org.apache.rya.indexing.pcj.fluo.api.CreatePcj(); -fluoCreatePcj.withRyaIntegration(pcjId, pcjStorage, fluoClient, getConnector(), ryaInstance); +fluoAppName);) { +// Initialize the PCJ within the Fluo application. +final org.apache.rya.indexing.pcj.fluo.api.CreatePcj fluoCreatePcj = new org.apache.rya.indexing.pcj.fluo.api.CreatePcj(); --- End diff -- can you import CreatePcj? > Add Aggregation support for Fluo/PCJ app > > > Key: RYA-260 > URL: https://issues.apache.org/jira/browse/RYA-260 > Project: Rya > Issue Type: New Feature >Reporter: Andrew Smith >Assignee: Kevin Chilton > > A user must be able to submit a PCJ query that contains the following > aggregation functions from SPARQL: > * Sum > * Count > * Average > * Min > * Max > This task does not include any aggregations that appear within a GroupBy > clause. We only need to support queries that have the aggregation within the > SELECT section. > For example, the following query should be processed: > {code} > SELECT (avg(?price) as ?averagePrice) > { > urn:BookA urn:price ?price. > } > {code} > And the following query should not be processed because it requires a group > by: > {code} > SELECT ?title (avg(?price) as ?averagePrice) > { > ?title urn:price ?price. > } > GROUP BY ?title > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104979#comment-16104979 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130092402 --- 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 -- I agree that it is Accumulo specific, but what I'm doing here is no different than the interactive code that was already in the InstallPrompt. When Mongo support is added, we can label these features as Accumulo only in the command help, maybe even prefix the names to make it more obvious -- and they'll fail immediately if the user tries to use them. The interactive command can just hide invalid options from the user. > 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104981#comment-16104981 ] 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_r130093053 --- 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); +
[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104969#comment-16104969 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130091678 --- 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 -- Good catch. > 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104968#comment-16104968 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130091543 --- 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 -- Good catch. I think this (and other future config settings) will need to be handled by the RyaConnectionCommands.connectToAccumulo() function. Currently it is nice to be able to change it while being connected, but it keeps the API cleaner if we move it. I'll make the adjustment. > 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104976#comment-16104976 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130091994 --- 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); +
[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104978#comment-16104978 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130092162 --- 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 -- Yeah, I had the full lubm in here and then I removed it due to licensing concerns. I thought this was generic enough, but I'll rename it to example.script and put an example query in there. > 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104970#comment-16104970 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130091740 --- 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); +
[jira] [Commented] (RYA-318) Add Loading Data and Executing SPARQL Queries to the Rya Shell
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104973#comment-16104973 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130091818 --- 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); +
[jira] [Commented] (RYA-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16107546#comment-16107546 ] ASF GitHub Bot commented on RYA-329: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/189 asfbot build > Review Integration Tests (breaking build) > - > > Key: RYA-329 > URL: https://issues.apache.org/jira/browse/RYA-329 > Project: Rya > Issue Type: Bug >Reporter: Aaron Mihalik >Assignee: Jeff Dasch > > Some of the integration tests are breaking the build. These tests seem to be > causing the JVMs running on b.a.o Jenkins boxes to die. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-317) Implement Nearby for mongo geo
[ https://issues.apache.org/jira/browse/RYA-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16107413#comment-16107413 ] ASF GitHub Bot commented on RYA-317: Github user amihalik closed the pull request at: https://github.com/apache/incubator-rya/pull/187 > Implement Nearby for mongo geo > -- > > Key: RYA-317 > URL: https://issues.apache.org/jira/browse/RYA-317 > Project: Rya > Issue Type: Bug >Reporter: Andrew Smith >Assignee: Andrew Smith > -- 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16105080#comment-16105080 ] ASF GitHub Bot commented on RYA-318: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130113701 --- 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 -- Agree. It would be nice to have the option to override default connection configs without disconnecting and reconnecting - especially for the case where the user wants to quickly visualize the difference in results when loading/querying data with different visibilities/authorizations. Would require an API change which is out of scope for this. > 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16105061#comment-16105061 ] ASF GitHub Bot commented on RYA-318: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/188#discussion_r130108687 --- 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 -- I can see value in exposing the flush parameter and other parameters to the user that are specific to the execution instance (as opposed to the particular connection instance). In the case of the flush parameter, a user might be more concerned with higher ingest and less concerned with having the table accurately reflect the data during ingest. On the other hand, when ingesting another file, they might want the table to immediately represent their data. In general, I think that there are a number of execution instance parameters that a user should be able to specify for some of the shell commands. While issuing a query through the shell, the user should be able to indicate which indexers they want to use and whether or not they want to use PCJs. These are all execution specific parameters. Unfortunately, the current API does not support this, and a user has to reconnect each time they want to change their query configuration or ingest configuration. Might be best to write up a Jira ticket for this and make it a wish for a new feature. > 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-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16107926#comment-16107926 ] ASF GitHub Bot commented on RYA-329: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/189 @meiercaleb @pujav65 This build is going to have a couple test failures. Can you guys take a look when it finishes in about an hour: https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/311/ > Review Integration Tests (breaking build) > - > > Key: RYA-329 > URL: https://issues.apache.org/jira/browse/RYA-329 > Project: Rya > Issue Type: Bug >Reporter: Aaron Mihalik >Assignee: Jeff Dasch > > Some of the integration tests are breaking the build. These tests seem to be > causing the JVMs running on b.a.o Jenkins boxes to die. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16107801#comment-16107801 ] ASF GitHub Bot commented on RYA-329: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/189 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/308/ > Review Integration Tests (breaking build) > - > > Key: RYA-329 > URL: https://issues.apache.org/jira/browse/RYA-329 > Project: Rya > Issue Type: Bug >Reporter: Aaron Mihalik >Assignee: Jeff Dasch > > Some of the integration tests are breaking the build. These tests seem to be > causing the JVMs running on b.a.o Jenkins boxes to die. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16107651#comment-16107651 ] ASF GitHub Bot commented on RYA-329: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/189 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/307/Failed Tests: 202incubator-rya-master-with-optionals-pull-requests/org.apache.rya:accumulo.rya: 7org.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.updateorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.isInitialized_trueorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.initializeAndGetorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.initialize_alreadyInitializedorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.update_outOfDateorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.getRyaInstance_notInitializedorg.apache.rya.accumulo.instance.AccumuloRyaDetailsRepositoryIT.isInitialized_falseincubator-rya-master-with-optionals-pull-requests/org.apache.rya:mongodb.rya: 5org.apache.rya.mongodb.MongoDBQueryEngineTest.org.apache.rya.mongodb.MongoDBQueryEngineTestorg.apache.rya.mongodb.MongoDBRyaDAOTest.org.apache.rya.mongodb.MongoDBRyaDAOTestorg.apache.rya.mongodb.MongoDBRyaDAOIT.org.apache.rya.mongodb.MongoDBRyaDAOITorg.apache.rya.mongodb.instance.MongoRyaDetailsRepositoryIT.org.apache.rya.mongodb.instance.MongoRyaDetailsRepositoryITorg.apache.rya.mongodb.instance.MongoRyaDetailsRepositoryIT.org.apache.rya.mongodb.instance.MongoRyaDetailsRepositoryITincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.benchmark: 1org.apache.rya.benchmark.query.QueryBenchmarkRunIT.org.apache.rya.benchmark.query.QueryBenchmarkRunITincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.console: 9org.apache.rya.shell.RyaConnectionCommandsIT.connectAccumulo_noAuthsorg.apache.rya.shell.RyaConnectionCommandsIT.connectToInstanceorg.apache.rya.shell.RyaConnectionCommandsIT.connectAccumulo_wrongCredentialsorg.apache.rya.shell.RyaConnectionCommandsIT.printConnectionDetails_connectedToAccumuloorg.apache.rya.shell.RyaConnectionCommandsIT.disconnectorg.apache.rya.shell.RyaConnectionCommandsIT.connectToInstance_instanceDoesNotExistorg.apache.rya.shell.RyaConnectionCommandsIT.connectAccumuloorg.apache.rya.shell.util.ConnectorFactoryIT.connect_wrongCredentialsorg.apache.rya.shell.util.ConnectorFactoryIT.connect_successfulincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.export.integration: 1org.apache.rya.indexing.export.StoreToStoreIT.initializationErrorincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.geoindexing:
[jira] [Commented] (RYA-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16108678#comment-16108678 ] ASF GitHub Bot commented on RYA-329: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/189 asfbot build > Review Integration Tests (breaking build) > - > > Key: RYA-329 > URL: https://issues.apache.org/jira/browse/RYA-329 > Project: Rya > Issue Type: Bug >Reporter: Aaron Mihalik >Assignee: Jeff Dasch > > Some of the integration tests are breaking the build. These tests seem to be > causing the JVMs running on b.a.o Jenkins boxes to die. -- 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111705#comment-16111705 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/337/Build result: FAILURE[...truncated 6.96 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 29:14 min[INFO] Finished at: 2017-08-02T20:55:43+00:00[INFO] Final Memory: 256M/3207M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project rya.geowave: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests@2/extras/rya.geoindexing/geo.geowave/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.geowavechannel stoppedSetting status of 2df0d571133eea02a9597bbf7caa6cc99c577e2e to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/337/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111788#comment-16111788 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/338/Build result: FAILURE[...truncated 7.10 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 29:52 min[INFO] Finished at: 2017-08-02T21:56:49+00:00[INFO] Final Memory: 499M/3383M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project geo.geowave: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.geoindexing/geo.geowave/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :geo.geowavechannel stoppedSetting status of ccc4fea642df499e9f0476277abc686ee797dbd3 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/338/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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-280) PeriodicQuery Support for Fluo
[ https://issues.apache.org/jira/browse/RYA-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111725#comment-16111725 ] ASF GitHub Bot commented on RYA-280: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/177 > 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)
[jira] [Commented] (RYA-324) geoWave and geoMesa depend on different versions of the GeoTools
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111727#comment-16111727 ] ASF GitHub Bot commented on RYA-324: Github user DLotts commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130995765 --- Diff: extras/rya.geoindexing/geo.mongo/pom.xml --- @@ -0,0 +1,29 @@ +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + 4.0.0 + +org.apache.rya +rya.geoindexing +3.2.11-incubating-SNAPSHOT + + rya.geomongo + Geo_indexing_for_mongo + Implementation of a geospatial indexing for mongo DB backed Rya + +UTF-8 +16.0 + + + + org.apache.rya + rya.geoCommon + 3.2.11-incubating-SNAPSHOT --- End diff -- This one line fixed all the old names. find . -name \*.xml -exec sed -i 's/rya.geoCommon/geo.common/g' {} \; -ls > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111722#comment-16111722 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/336/Build result: FAILURE[...truncated 7.42 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 58:50 min[INFO] Finished at: 2017-08-02T21:00:40+00:00[INFO] Final Memory: 281M/2629M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project rya.geowave: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.geoindexing/geo.geowave/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.geowavechannel stoppedSetting status of 6a94e7b59bd4b6d29e9df74f60c1a31493421862 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/336/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111682#comment-16111682 ] ASF GitHub Bot commented on RYA-324: Github user DLotts commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130990825 --- Diff: extras/rya.geoindexing/geo.common/pom.xml --- @@ -0,0 +1,25 @@ + + + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + 4.0.0 + + org.apache.rya + rya.geoindexing + 3.2.11-incubating-SNAPSHOT + + + rya.geoCommon --- End diff -- Good catch! I changed the name weeks ago, but artifact name was not changed automatically by eclipse. > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111685#comment-16111685 ] ASF GitHub Bot commented on RYA-324: Github user DLotts commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130991587 --- Diff: extras/rya.geoindexing/geo.mongo/pom.xml --- @@ -0,0 +1,29 @@ +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + 4.0.0 + +org.apache.rya +rya.geoindexing +3.2.11-incubating-SNAPSHOT + + rya.geomongo + Geo_indexing_for_mongo + Implementation of a geospatial indexing for mongo DB backed Rya + +UTF-8 +16.0 + + + + org.apache.rya + rya.geoCommon + 3.2.11-incubating-SNAPSHOT --- End diff -- and the name is wrong here too. geo.common > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110018#comment-16110018 ] ASF GitHub Bot commented on RYA-324: Github user amihalik commented on the issue: https://github.com/apache/incubator-rya/pull/182 I know that we planned to commit this PR to master first, but #186 is ready to go. I looked at this and #186. It turns out that we can commit #186 into master, then commit this PR, and we won't have any merge issues. Since #186 is ready now, I'm going to commit it, and then assist you with any issues you have merging this PR. --Aaron > 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-323) Enable Multi Var Geo Functions
[ https://issues.apache.org/jira/browse/RYA-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16112179#comment-16112179 ] ASF GitHub Bot commented on RYA-323: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/183 > 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)
[jira] [Commented] (RYA-317) Implement Nearby for mongo geo
[ https://issues.apache.org/jira/browse/RYA-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16112178#comment-16112178 ] ASF GitHub Bot commented on RYA-317: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/186 > Implement Nearby for mongo geo > -- > > Key: RYA-317 > URL: https://issues.apache.org/jira/browse/RYA-317 > Project: Rya > Issue Type: Bug >Reporter: Andrew Smith >Assignee: Andrew Smith > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-329) Review Integration Tests (breaking build)
[ https://issues.apache.org/jira/browse/RYA-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110895#comment-16110895 ] ASF GitHub Bot commented on RYA-329: Github user jdasch closed the pull request at: https://github.com/apache/incubator-rya/pull/189 > Review Integration Tests (breaking build) > - > > Key: RYA-329 > URL: https://issues.apache.org/jira/browse/RYA-329 > Project: Rya > Issue Type: Bug >Reporter: Aaron Mihalik >Assignee: Jeff Dasch > > Some of the integration tests are breaking the build. These tests seem to be > causing the JVMs running on b.a.o Jenkins boxes to die. -- 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109849#comment-16109849 ] ASF GitHub Bot commented on RYA-324: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130736405 --- Diff: extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java --- @@ -0,0 +1,242 @@ +package org.apache.rya.indexing.geoExamples; +/* + * 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. + */ + +import java.io.IOException; +import java.util.List; + +import org.apache.commons.lang.Validate; +import org.apache.hadoop.conf.Configuration; +import org.apache.log4j.Logger; +import org.apache.rya.indexing.GeoRyaSailFactory; +import org.apache.rya.indexing.accumulo.ConfigUtils; +import org.apache.rya.indexing.accumulo.geo.OptionalConfigUtils; +import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration; +import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration.MongoDBIndexingConfigBuilder; +import org.apache.rya.mongodb.MockMongoFactory; +import org.apache.rya.mongodb.MongoConnectorFactory; +import org.openrdf.model.vocabulary.RDFS; +import org.openrdf.query.BindingSet; +import org.openrdf.query.MalformedQueryException; +import org.openrdf.query.QueryEvaluationException; +import org.openrdf.query.QueryLanguage; +import org.openrdf.query.QueryResultHandlerException; +import org.openrdf.query.TupleQuery; +import org.openrdf.query.TupleQueryResultHandler; +import org.openrdf.query.TupleQueryResultHandlerException; +import org.openrdf.query.Update; +import org.openrdf.query.UpdateExecutionException; +import org.openrdf.repository.RepositoryException; +import org.openrdf.repository.sail.SailRepository; +import org.openrdf.repository.sail.SailRepositoryConnection; +import org.openrdf.sail.Sail; + +import com.mongodb.MongoClient; +import com.mongodb.ServerAddress; + +public class RyaMongoGeoDirectExample { +private static final Logger log = Logger.getLogger(RyaMongoGeoDirectExample.class); + +// +// Connection configuration parameters +// + +private static final boolean PRINT_QUERIES = true; +private static final String MONGO_DB = "rya"; +private static final String MONGO_COLL_PREFIX = "rya_"; +private static final boolean USE_MOCK = true; +private static final boolean USE_INFER = true; +private static final String MONGO_INSTANCE_URL = "localhost"; +private static final String MONGO_INSTANCE_PORT = "27017"; + +public static void main(String[] args) throws Exception { +Configuration conf = getConf(); +conf.setBoolean(ConfigUtils.DISPLAY_QUERY_PLAN, PRINT_QUERIES); + conf.setBoolean(OptionalConfigUtils.USE_GEO, true); // Note also the use of "GeoRyaSailFactory" below. + conf.setStrings(OptionalConfigUtils.GEO_PREDICATES_LIST, "http://www.opengis.net/ont/geosparql#asWKT;); // Note also the use of "GeoRyaSailFactory" below. + +SailRepository repository = null; +SailRepositoryConnection conn = null; +try { +log.info("Connecting to Indexing Sail Repository."); +Sail sail = GeoRyaSailFactory.getInstance(conf); +repository = new SailRepository(sail); +conn = repository.getConnection(); + +long start = System.currentTimeMillis(); +testAddPointAndWithinSearch(conn); // uses geospatial features + +log.info("TIME: " + (System.currentTimeMillis() - start) / 1000.); +} finally { +log.info("Shutting down"); +closeQuietly(conn); +closeQuietly(repository); +if (mock != null) { +mock.shutdown(); +
[jira] [Commented] (RYA-324) geoWave and geoMesa depend on different versions of the GeoTools
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109848#comment-16109848 ] ASF GitHub Bot commented on RYA-324: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130736574 --- Diff: extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/accumulo/geo/OptionalConfigUtils.java --- @@ -81,7 +82,17 @@ public static boolean getUseGeoTemporal(final Configuration conf) { * {@code null} if it doesn't exist. */ public static GeoIndexerType getGeoIndexerType(final Configuration conf) { -return conf.getEnum(GEO_INDEXER_TYPE, null); + String confType[] = conf.getStrings(GEO_INDEXER_TYPE); --- End diff -- did not address this > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109899#comment-16109899 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/324/Build result: ABORTED[...truncated 6.65 MB...][INFO] [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 14 iota=59[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.Maven3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid object ID 14 iota=59[INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-mvn) @ rya.pcj.fluo.demo ---Build was aborted[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: java.util.concurrent.ExecutionException: Invalid object ID 14 iota=59[INFO] [INFO] --- maven-remote-resources-plugin:1.5:process (default) @ rya.pcj.fluo.demo ---channel stoppedSetting status of 490869950441b0e0d7aa10f3b95cf9b7691376dc to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/324/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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-330) Add profile to skip fluo pcj integration tests
[ https://issues.apache.org/jira/browse/RYA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109626#comment-16109626 ] ASF GitHub Bot commented on RYA-330: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/190 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/325/ > Add profile to skip fluo pcj integration tests > -- > > Key: RYA-330 > URL: https://issues.apache.org/jira/browse/RYA-330 > Project: Rya > Issue Type: Sub-task >Reporter: Jeff Dasch >Assignee: Jeff Dasch > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-330) Add profile to skip fluo pcj integration tests
[ https://issues.apache.org/jira/browse/RYA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109693#comment-16109693 ] ASF GitHub Bot commented on RYA-330: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/190 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/327/ > Add profile to skip fluo pcj integration tests > -- > > Key: RYA-330 > URL: https://issues.apache.org/jira/browse/RYA-330 > Project: Rya > Issue Type: Sub-task >Reporter: Jeff Dasch >Assignee: Jeff Dasch > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-330) Add profile to enable integration tests
[ https://issues.apache.org/jira/browse/RYA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109709#comment-16109709 ] ASF GitHub Bot commented on RYA-330: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/190 > Add profile to enable integration tests > --- > > Key: RYA-330 > URL: https://issues.apache.org/jira/browse/RYA-330 > Project: Rya > Issue Type: Sub-task >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > The integration tests do not play nice with apache's build environment. > Disabling by default until we can get them stabilized, or get a stable subset > identified. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-330) Add profile to skip fluo pcj integration tests
[ https://issues.apache.org/jira/browse/RYA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109691#comment-16109691 ] ASF GitHub Bot commented on RYA-330: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/190 asfbot build > Add profile to skip fluo pcj integration tests > -- > > Key: RYA-330 > URL: https://issues.apache.org/jira/browse/RYA-330 > Project: Rya > Issue Type: Sub-task >Reporter: Jeff Dasch >Assignee: Jeff Dasch > -- 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109897#comment-16109897 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/330/ > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109847#comment-16109847 ] ASF GitHub Bot commented on RYA-324: Github user isper3at commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/182#discussion_r130736014 --- Diff: extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/accumulo/geo/OptionalConfigUtils.java --- @@ -104,26 +116,26 @@ public static void setIndexers(final RdfCloudTripleStoreConfiguration conf) { if (ConfigUtils.getUseMongo(conf)) { if (getUseGeo(conf)) { -if (geoIndexerType == null) { +if (geoIndexerType == GeoIndexerType.UNSPECIFIED) { // Default to MongoGeoIndexer if not specified -indexList.add(MongoGeoIndexer.class.getName()); + indexList.add(GeoIndexerType.MONGO_DB.getGeoIndexerClassString()); //MongoGeoIndexer.class.getName()); --- End diff -- remove commented out code > 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-330) Add profile to skip fluo pcj integration tests
[ https://issues.apache.org/jira/browse/RYA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109613#comment-16109613 ] ASF GitHub Bot commented on RYA-330: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/190 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/323/ > Add profile to skip fluo pcj integration tests > -- > > Key: RYA-330 > URL: https://issues.apache.org/jira/browse/RYA-330 > Project: Rya > Issue Type: Sub-task >Reporter: Jeff Dasch >Assignee: Jeff Dasch > -- 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16109822#comment-16109822 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/328/ > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113197#comment-16113197 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/347/Build result: FAILURE[...truncated 6.48 MB...][INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 23:24 min[INFO] Finished at: 2017-08-03T17:59:32+00:00[INFO] Final Memory: 398M/2938M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project geo.geowave: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.geoindexing/geo.geowave/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :geo.geowavechannel stoppedSetting status of 7b752c5972388be9014b26c1e0c7e0b61ea5c6be to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/347/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113166#comment-16113166 ] ASF GitHub Bot commented on RYA-324: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/182 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/346/Build result: FAILURE[...truncated 6.94 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 28:21 min[INFO] Finished at: 2017-08-03T17:43:07+00:00[INFO] Final Memory: 325M/2928M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project geo.geowave: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/rya.geoindexing/geo.geowave/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :geo.geowavechannel stoppedSetting status of eecd61458b7b0a2a022b9436bab3ab2210ddab42 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/346/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > 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-284) Enhance accumulo.rya to support the use of bloom filter
[ https://issues.apache.org/jira/browse/RYA-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113371#comment-16113371 ] ASF GitHub Bot commented on RYA-284: Github user thn-w commented on the issue: https://github.com/apache/incubator-rya/pull/170 The error is related to "context" (as mentioned by @amihalik) that was added. I don't have enough knowledge to address the test failures related to context at all. > 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)
[jira] [Commented] (RYA-325) Refactoring: rename rya.console to rya.shell
[ https://issues.apache.org/jira/browse/RYA-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113347#comment-16113347 ] ASF GitHub Bot commented on RYA-325: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/194 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/348/ > Refactoring: rename rya.console to rya.shell > > > Key: RYA-325 > URL: https://issues.apache.org/jira/browse/RYA-325 > Project: Rya > Issue Type: Sub-task > Components: clients >Affects Versions: 3.2.10 >Reporter: Jeff Dasch >Assignee: Jeff Dasch > Fix For: 3.2.11 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-250) Smart URI avoid data duplication
[ https://issues.apache.org/jira/browse/RYA-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113460#comment-16113460 ] ASF GitHub Bot commented on RYA-250: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/153 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/352/Build result: FAILURE[...truncated 4.40 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 07:26 min[INFO] Finished at: 2017-08-03T20:51:59+00:00[INFO] Final Memory: 176M/2998M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project rya.indexing: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/indexing/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.indexingchannel stoppedSetting status of 34cabe2bf03f0674ee41e49b18f2b44645d716e8 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/352/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > Smart URI avoid data duplication > > > Key: RYA-250 > URL: https://issues.apache.org/jira/browse/RYA-250 > Project: Rya > Issue Type: Task > Components: dao >Affects Versions: 3.2.10 >Reporter: Eric White >Assignee: Eric White > Fix For: 3.2.10 > > > Implement Smart URI methods for avoiding data duplication. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-250) Smart URI avoid data duplication
[ https://issues.apache.org/jira/browse/RYA-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113363#comment-16113363 ] ASF GitHub Bot commented on RYA-250: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/153 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/349/Build result: FAILURE[...truncated 4.41 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 06:51 min[INFO] Finished at: 2017-08-03T19:40:41+00:00[INFO] Final Memory: 330M/3416M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project rya.indexing: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests/extras/indexing/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.indexingchannel stoppedSetting status of 399848f707f3f7f9e69cf8deaa8e4d1607f242a4 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/349/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > Smart URI avoid data duplication > > > Key: RYA-250 > URL: https://issues.apache.org/jira/browse/RYA-250 > Project: Rya > Issue Type: Task > Components: dao >Affects Versions: 3.2.10 >Reporter: Eric White >Assignee: Eric White > Fix For: 3.2.10 > > > Implement Smart URI methods for avoiding data duplication. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-325) Refactoring: rename rya.console to rya.shell
[ https://issues.apache.org/jira/browse/RYA-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113360#comment-16113360 ] ASF GitHub Bot commented on RYA-325: Github user amihalik commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/194#discussion_r131240139 --- Diff: extras/pom.xml --- @@ -34,7 +34,7 @@ under the License. rya.prospector rya.manual rya.periodic.service -rya.console +shell --- End diff -- agree with Andrew. Why not put this is rya.shell? > Refactoring: rename rya.console to rya.shell > > > Key: RYA-325 > URL: https://issues.apache.org/jira/browse/RYA-325 > Project: Rya > Issue Type: Sub-task > Components: clients >Affects Versions: 3.2.10 >Reporter: Jeff Dasch >Assignee: Jeff Dasch > Fix For: 3.2.11 > > -- 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
[ https://issues.apache.org/jira/browse/RYA-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113343#comment-16113343 ] ASF GitHub Bot commented on RYA-318: Github user jdasch closed the pull request at: https://github.com/apache/incubator-rya/pull/188 > 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 > Fix For: 3.2.11 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-283) Incorporate Batch Operations into Fluo Workflow
[ https://issues.apache.org/jira/browse/RYA-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113397#comment-16113397 ] ASF GitHub Bot commented on RYA-283: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/193 Punting until RYA-283 gets merged. > Incorporate Batch Operations into Fluo Workflow > --- > > Key: RYA-283 > URL: https://issues.apache.org/jira/browse/RYA-283 > Project: Rya > Issue Type: Bug >Affects Versions: 3.2.10 >Reporter: Caleb Meier >Assignee: Caleb Meier > > The BatchObserver framework that is currently under development needs to be > integrated with Fluo. That is, wherever results are added to Fluo from an > iterator, or whenever results are deleted within an iteration, Fluo should > instead delegate that task to the BatchObserver. This will ensure that Fluo > will not throw an OutOfMemory exception in the event that it attempts to > process an extremely large transaction. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-250) Smart URI avoid data duplication
[ https://issues.apache.org/jira/browse/RYA-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113455#comment-16113455 ] ASF GitHub Bot commented on RYA-250: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/153 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/351/Build result: FAILURE[...truncated 4.38 MB...][INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 04:59 min[INFO] Finished at: 2017-08-03T20:46:07+00:00[INFO] Final Memory: 257M/3050M[INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (check-licenses) on project rya.indexing: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/incubator-rya-master-with-optionals-pull-requests@2/extras/indexing/target/rat.txt -> [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/MojoFailureException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.indexingchannel stoppedSetting status of dd75ff96d5c083a274d7a0590311e36a467f375f to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/351/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > Smart URI avoid data duplication > > > Key: RYA-250 > URL: https://issues.apache.org/jira/browse/RYA-250 > Project: Rya > Issue Type: Task > Components: dao >Affects Versions: 3.2.10 >Reporter: Eric White >Assignee: Eric White > Fix For: 3.2.10 > > > Implement Smart URI methods for avoiding data duplication. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-307) MongoDB Bulk Load methods should use Secondary Indexer Bulk Loading
[ https://issues.apache.org/jira/browse/RYA-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113809#comment-16113809 ] ASF GitHub Bot commented on RYA-307: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/181 > MongoDB Bulk Load methods should use Secondary Indexer Bulk Loading > --- > > Key: RYA-307 > URL: https://issues.apache.org/jira/browse/RYA-307 > Project: Rya > Issue Type: Improvement > Components: dao >Reporter: Aaron Mihalik >Assignee: Eric White > > The MongoDB secondary indexers *really* slow down inserts via the bulk load > methods for the DAO. The DAO should use the bulk load methods on the > secondary indexers. Here is where the call is made in the DAO [1] > [1] > https://github.com/apache/incubator-rya/blob/master/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java#L158 > Some version of a BatchWriter should be created for Mongo that is used in the > DAO and any secondary indexers. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-313) Rya Mongo Blows up on Large result sets
[ https://issues.apache.org/jira/browse/RYA-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113707#comment-16113707 ] ASF GitHub Bot commented on RYA-313: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/196 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/353/Failed Tests: 2incubator-rya-master-with-optionals-pull-requests/org.apache.rya:mongodb.rya: 1org.apache.rya.mongodb.MongoDBQueryEngineTest.statementQueryincubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.indexing.example: 1ExamplesTest.MongoRyaDirectExampleTest > Rya Mongo Blows up on Large result sets > --- > > Key: RYA-313 > URL: https://issues.apache.org/jira/browse/RYA-313 > Project: Rya > Issue Type: Bug > Components: dao >Affects Versions: 3.2.10 > Environment: Mongo DB with Rya 3.2.11-SNAPSHOT with a lot of data in > Rya >Reporter: Aaron Mihalik >Assignee: Andrew Smith > > Simple queries that return a lot of results fail because mongo is trying to > send all of the results back at once. For instance, if I have a lot of data > and run something like: > {noformat} > SELECT * WHERE > { > ?s a ?t. > } > {noformat} > I will get this exception. > {noformat} > Caused by: com.mongodb.MongoCommandException: Command failed with error > 16389: 'aggregation result exceeds maximum document size (16MB)' on server > localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "aggregation > result exceeds maximum document size (16MB)", "code" : 16389 } > {noformat} > I think we need to toss in a "AggregationOptions with Batch = 1000", but I > couldn't get that to work immediately. Somebody with more mongo experience > needs to look at this. > [Here is the line of > code|https://github.com/apache/incubator-rya/blob/master/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/iter/RyaStatementBindingSetCursorIterator.java#L114] -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-325) Refactoring: rename rya.console to rya.shell
[ https://issues.apache.org/jira/browse/RYA-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113720#comment-16113720 ] ASF GitHub Bot commented on RYA-325: Github user amihalik commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/194#discussion_r131287677 --- Diff: extras/pom.xml --- @@ -34,7 +34,7 @@ under the License. rya.prospector rya.manual rya.periodic.service -rya.console +shell --- End diff -- okay, I'm fine with this. > Refactoring: rename rya.console to rya.shell > > > Key: RYA-325 > URL: https://issues.apache.org/jira/browse/RYA-325 > Project: Rya > Issue Type: Sub-task > Components: clients >Affects Versions: 3.2.10 >Reporter: Jeff Dasch >Assignee: Jeff Dasch > Fix For: 3.2.11 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-313) Rya Mongo Blows up on Large result sets
[ https://issues.apache.org/jira/browse/RYA-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16113665#comment-16113665 ] ASF GitHub Bot commented on RYA-313: GitHub user isper3at opened a pull request: https://github.com/apache/incubator-rya/pull/196 RYA-313 Aggregation now is performed over batches of 1000. ## Description >What Changed? Changed the iterator to use the non-deprecated Mongo api, enabled the aggregation framework to work properly. This could be a very good reason to address: [Jira mongo api ticket](https://issues.apache.org/jira/browse/RYA-302) ### Tests >Coverage? No tests, just ran locally and assured that no exception for document size was thrown. ### Links [Jira](https://issues.apache.org/jira/browse/RYA-313) ### Checklist - [ ] Code Review - [ ] Squash Commits People To Reivew @amihalik You can merge this pull request into a Git repository by running: $ git pull https://github.com/isper3at/incubator-rya RYA-313 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/196.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 #196 commit 3b279972198d34a2bcda775bc6ec4f9a87ade8ba Author: isper3atDate: 2017-08-03T23:03:11Z RYA-313 Aggregation now is performed over batches of 1000. > Rya Mongo Blows up on Large result sets > --- > > Key: RYA-313 > URL: https://issues.apache.org/jira/browse/RYA-313 > Project: Rya > Issue Type: Bug > Components: dao >Affects Versions: 3.2.10 > Environment: Mongo DB with Rya 3.2.11-SNAPSHOT with a lot of data in > Rya >Reporter: Aaron Mihalik >Assignee: Andrew Smith > > Simple queries that return a lot of results fail because mongo is trying to > send all of the results back at once. For instance, if I have a lot of data > and run something like: > {noformat} > SELECT * WHERE > { > ?s a ?t. > } > {noformat} > I will get this exception. > {noformat} > Caused by: com.mongodb.MongoCommandException: Command failed with error > 16389: 'aggregation result exceeds maximum document size (16MB)' on server > localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "aggregation > result exceeds maximum document size (16MB)", "code" : 16389 } > {noformat} > I think we need to toss in a "AggregationOptions with Batch = 1000", but I > couldn't get that to work immediately. Somebody with more mongo experience > needs to look at this. > [Here is the line of > code|https://github.com/apache/incubator-rya/blob/master/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/iter/RyaStatementBindingSetCursorIterator.java#L114] -- 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
[ https://issues.apache.org/jira/browse/RYA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16112711#comment-16112711 ] ASF GitHub Bot commented on RYA-324: Github user jdasch commented on the issue: https://github.com/apache/incubator-rya/pull/182 Nit on artifact names. Please make them consistent with other artifacts: ``` [INFO] Reactor Build Order: [INFO] [INFO] Apache Rya Project [INFO] Apache Rya Common Projects [INFO] Apache Rya Common API [INFO] Apache Rya Provenance [INFO] Apache Rya DAO Projects [INFO] Apache Rya Accumulo DAO [INFO] Apache Rya MongoDB DAO [INFO] Apache Rya Extra Projects [INFO] Apache Rya Prospector [INFO] Apache Rya Manual [INFO] Apache Rya SAIL [INFO] Apache Rya PCJ Core [INFO] Apache Rya PCJ Fluo Parent [INFO] Apache Rya PCJ Fluo App [INFO] Apache Rya PCJ Fluo API [INFO] Apache Rya Secondary Indexing [INFO] Apache Rya Console [INFO] Apache Rya Secondary Indexing Example [INFO] Apache Rya MapReduce Tools [INFO] Apache Rya Reasoning [INFO] Apache Rya Vagrant VM [INFO] Apache Rya PCJ Fluo Client [INFO] Apache Rya PCJ Fluo Integration Tests [INFO] Apache Rya PCJ Fluo Demo [INFO] Apache Rya Export Parent [INFO] Apache Rya Export API [INFO] Apache Rya Export Accumulo [INFO] Apache Rya Export Mongo [INFO] Apache Rya Export Client [INFO] Apache Rya Export Integration Tests [INFO] Apache Rya Merge Tool [INFO] Apache Rya Giraph [INFO] Apache Rya Benchmarks [INFO] Geo indexing parent for multiple geo implementations [INFO] Apache Rya Geospatial Secondary Indexing (Optional) [INFO] Geo Indexing using GeoMesa [INFO] Geo indexing using GeoWave [INFO] Geo indexing for mongo [INFO] Apache Rya OSGI Bundle [INFO] Apache Rya ALX [INFO] Apache Rya ALX Console [INFO] Apache Rya Camel [INFO] Apache Rya Pig Projects [INFO] Apache Rya Accumulo Pig [INFO] Apache Rya Spark Support [INFO] Apache Rya Web Projects [INFO] Apache Rya Web Implementation ``` > 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-340) rya.fluo.pcj.app is not currently deployable in fluo-1.0.0
[ https://issues.apache.org/jira/browse/RYA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127618#comment-16127618 ] ASF GitHub Bot commented on RYA-340: GitHub user jdasch opened a pull request: https://github.com/apache/incubator-rya/pull/207 RYA-340 Added dependency filtering to rya.pcj.fluo.app for deployments. ## Description - Added dependency filtering to rya.pcj.fluo.app for deployments. - Also improved scoping of dependencies and dependencyManagement. - Updated integration tests to use -Djava.net.preferIPv4Stack=true. ### Tests Minor IT improvements in pom. No code changes. ### Links [Jira RYA-340](https://issues.apache.org/jira/browse/RYA-340) ### 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-340 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/207.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 #207 commit 17acdce7e3f0a71112e22971943243cfacf3b658 Author: jdaschDate: 2017-08-14T20:18:42Z RYA-340 Added dependency filtering to rya.pcj.fluo.app for deployments. - Also improved scoping of dependencies and dependencyManagement. - Updated integration tests to use -Djava.net.preferIPv4Stack=true. > rya.fluo.pcj.app is not currently deployable in fluo-1.0.0 > -- > > Key: RYA-340 > URL: https://issues.apache.org/jira/browse/RYA-340 > Project: Rya > Issue Type: Sub-task > Components: build >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > There is a guava versioning incompatibility. Fastest fix is to improve the > generated artifact through filtering. > {noformat} > Exception in thread "ServiceDelegate STARTING" > java.lang.IncompatibleClassChangeError: class > org.apache.twill.internal.utils.Dependencies$DependencyClassVisitor has > interface org.objectweb.asm.ClassVisitor as super class > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:763) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) > at java.net.URLClassLoader.access$100(URLClassLoader.java:73) > at java.net.URLClassLoader$1.run(URLClassLoader.java:368) > at java.net.URLClassLoader$1.run(URLClassLoader.java:362) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:361) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at > org.apache.twill.internal.utils.Dependencies.findClassDependencies(Dependencies.java:86) > at > org.apache.twill.internal.ApplicationBundler.findDependencies(ApplicationBundler.java:198) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:155) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:126) > at > org.apache.twill.yarn.YarnTwillPreparer.createAppMasterJar(YarnTwillPreparer.java:402) > at > org.apache.twill.yarn.YarnTwillPreparer.access$200(YarnTwillPreparer.java:108) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:299) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:289) > at > org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:97) > at > org.apache.twill.internal.AbstractZKServiceController.startUp(AbstractZKServiceController.java:76) > at > org.apache.twill.internal.AbstractExecutionServiceController$ServiceDelegate.startUp(AbstractExecutionServiceController.java:175) > at > com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43) > at java.lang.Thread.run(Thread.java:748) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-340) rya.fluo.pcj.app is not currently deployable in fluo-1.0.0
[ https://issues.apache.org/jira/browse/RYA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127640#comment-16127640 ] ASF GitHub Bot commented on RYA-340: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/207 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/393/Build result: FAILURE[...truncated 1.39 MB...][INFO] Apache Rya Spark Support ... SKIPPED[INFO] Apache Rya Web Projects SKIPPED[INFO] Apache Rya Web Implementation .. SKIPPED[INFO] [INFO] BUILD FAILURE[INFO] [INFO] Total time: 10:34 min[INFO] Finished at: 2017-08-15T17:57:30+00:00[INFO] Final Memory: 141M/3074M[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (make-assembly) on project rya.pcj.fluo.client: Failed to create assembly: Error creating assembly archive jar-with-dependencies: Error finalizing component-set for archive. Reason: Permission denied -> [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/MojoExecutionException[ERROR] [ERROR] After correcting the problems, you can resume the build with the command[ERROR] mvn -rf :rya.pcj.fluo.clientchannel stoppedSetting status of 17acdce7e3f0a71112e22971943243cfacf3b658 to FAILURE with url https://builds.apache.org/job/incubator-rya-master-with-optionals-pull-requests/393/ and message: 'FAILURE 'Using context: Jenkins: clean package -Pgeoindexing > rya.fluo.pcj.app is not currently deployable in fluo-1.0.0 > -- > > Key: RYA-340 > URL: https://issues.apache.org/jira/browse/RYA-340 > Project: Rya > Issue Type: Sub-task > Components: build >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > There is a guava versioning incompatibility. Fastest fix is to improve the > generated artifact through filtering. > {noformat} > Exception in thread "ServiceDelegate STARTING" > java.lang.IncompatibleClassChangeError: class > org.apache.twill.internal.utils.Dependencies$DependencyClassVisitor has > interface org.objectweb.asm.ClassVisitor as super class > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:763) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) > at java.net.URLClassLoader.access$100(URLClassLoader.java:73) > at java.net.URLClassLoader$1.run(URLClassLoader.java:368) > at java.net.URLClassLoader$1.run(URLClassLoader.java:362) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:361) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at > org.apache.twill.internal.utils.Dependencies.findClassDependencies(Dependencies.java:86) > at > org.apache.twill.internal.ApplicationBundler.findDependencies(ApplicationBundler.java:198) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:155) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:126) > at > org.apache.twill.yarn.YarnTwillPreparer.createAppMasterJar(YarnTwillPreparer.java:402) > at > org.apache.twill.yarn.YarnTwillPreparer.access$200(YarnTwillPreparer.java:108) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:299) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:289) > at > org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:97) > at > org.apache.twill.internal.AbstractZKServiceController.startUp(AbstractZKServiceController.java:76) > at > org.apache.twill.internal.AbstractExecutionServiceController$ServiceDelegate.startUp(AbstractExecutionServiceController.java:175) > at >
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127389#comment-16127389 ] ASF GitHub Bot commented on RYA-292: GitHub user ejwhite922 opened a pull request: https://github.com/apache/incubator-rya/pull/206 RYA-292 Added owl:intersectionOf inference. ## Description Inference applies owl:intersectionOf semantics for queries including statement patterns of the form "?x rdf:type :DefinedClass". The owl:intersectionOf property links a class to a list of class descriptions. An owl:intersectionOf statement describes a class for which the class extension contains precisely those individuals that are members of the class extension of all class descriptions in the list. The InferenceEngine, at refresh time, stores information about owl:intersectionOf. It stores a mapping of each type that has an intersection to its list of intersection sets (since each type can have multiple intersections) These mapped definitions can then be accessed by the method: getIntersectionsImplying(Resource). Also, :A owl:intersectionOf(:B, :C) implies that :A subClassOf :B and :A subClassOf :C so members of the intersection are added to the subClassOf graph. IntersectionOfVisitor processes statement patterns of the form "?x rdf:type :T2", and if :T2 is the value type for any owl:intersectionOf restriction according to the inference engine, it replaces the statement pattern with a union: of 1) that same statement pattern (in case the type is explicitly asserted or can be inferred by some other rule); and 2) a nested join tree of all the combined intersections for that type. RdfCloudTripleStoreConnection calls the visitor along with the other inference logic. Because the original statement pattern is preserved as one branch of the union, other visitors can still apply if there are other ways to derive the type. Added a simple example of a query that relies on this inference to MongoRyaDirectExample. ### Tests Unit tests ### Links [Jira](https://issues.apache.org/jira/browse/RYA-292) ### Checklist - [ ] Code Review - [ ] Squash Commits People To Review @jessehatfield @meiercaleb @isper3at @pujav65 You can merge this pull request into a Git repository by running: $ git pull https://github.com/ejwhite922/incubator-rya RYA-292_IntersectionOfInference Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/206.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 #206 commit f1d90f7f2e8d073fe3457f2dec89eec9675abe73 Author: eric.whiteDate: 2017-08-02T21:52:10Z RYA-292 Added owl:intersectionOf inference. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-340) rya.fluo.pcj.app is not currently deployable in fluo-1.0.0
[ https://issues.apache.org/jira/browse/RYA-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127867#comment-16127867 ] ASF GitHub Bot commented on RYA-340: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/207 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/395/ > rya.fluo.pcj.app is not currently deployable in fluo-1.0.0 > -- > > Key: RYA-340 > URL: https://issues.apache.org/jira/browse/RYA-340 > Project: Rya > Issue Type: Sub-task > Components: build >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > There is a guava versioning incompatibility. Fastest fix is to improve the > generated artifact through filtering. > {noformat} > Exception in thread "ServiceDelegate STARTING" > java.lang.IncompatibleClassChangeError: class > org.apache.twill.internal.utils.Dependencies$DependencyClassVisitor has > interface org.objectweb.asm.ClassVisitor as super class > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:763) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) > at java.net.URLClassLoader.access$100(URLClassLoader.java:73) > at java.net.URLClassLoader$1.run(URLClassLoader.java:368) > at java.net.URLClassLoader$1.run(URLClassLoader.java:362) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:361) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at > org.apache.twill.internal.utils.Dependencies.findClassDependencies(Dependencies.java:86) > at > org.apache.twill.internal.ApplicationBundler.findDependencies(ApplicationBundler.java:198) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:155) > at > org.apache.twill.internal.ApplicationBundler.createBundle(ApplicationBundler.java:126) > at > org.apache.twill.yarn.YarnTwillPreparer.createAppMasterJar(YarnTwillPreparer.java:402) > at > org.apache.twill.yarn.YarnTwillPreparer.access$200(YarnTwillPreparer.java:108) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:299) > at > org.apache.twill.yarn.YarnTwillPreparer$1.call(YarnTwillPreparer.java:289) > at > org.apache.twill.yarn.YarnTwillController.doStartUp(YarnTwillController.java:97) > at > org.apache.twill.internal.AbstractZKServiceController.startUp(AbstractZKServiceController.java:76) > at > org.apache.twill.internal.AbstractExecutionServiceController$ServiceDelegate.startUp(AbstractExecutionServiceController.java:175) > at > com.google.common.util.concurrent.AbstractIdleService$1$1.run(AbstractIdleService.java:43) > at java.lang.Thread.run(Thread.java:748) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128086#comment-16128086 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133312263 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -220,163 +229,163 @@ public void refreshGraph() throws InferenceEngineException { } } inverseOfMap = invProp; - -ValueFactory vf = ValueFactoryImpl.getInstance(); -iter = RyaDAOHelper.query(ryaDAO, null, - vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), - null, conf); -MappropertyChainPropertiesToBNodes = new HashMap (); -propertyChainPropertyToChain = new HashMap (); + +final ValueFactory vf = ValueFactoryImpl.getInstance(); +iter = RyaDAOHelper.query(ryaDAO, null, + vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), +null, conf); +final Map propertyChainPropertiesToBNodes = new HashMap<>(); +propertyChainPropertyToChain = new HashMap<>(); try { - while (iter.hasNext()){ - Statement st = iter.next(); - propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); - } +while (iter.hasNext()){ +final Statement st = iter.next(); + propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); +} } finally { if (iter != null) { iter.close(); } } // now for each property chain bNode, get the indexed list of properties associated with that chain -for (URI propertyChainProperty : propertyChainPropertiesToBNodes.keySet()){ - URI bNode = propertyChainPropertiesToBNodes.get(propertyChainProperty); - // query for the list of indexed properties - iter = RyaDAOHelper.query(ryaDAO, bNode, vf.createURI("http://www.w3.org/2000/10/swap/list#index;), - null, conf); - TreeMap orderedProperties = new TreeMap (); - // TODO refactor this. Wish I could execute sparql - try { - while (iter.hasNext()){ - Statement st = iter.next(); - String indexedElement = st.getObject().stringValue(); - System.out.println(indexedElement); - CloseableIteration iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.FIRST, - null, conf); - String integerValue = ""; - Value anonPropNode = null; - Value propURI = null; - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - integerValue = iter2Statement.getObject().stringValue(); - break; - } - iter2.close(); - } - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.REST, - null, conf); - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - anonPropNode = iter2Statement.getObject(); - break; - } - iter2.close(); - if (anonPropNode != null){ - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(anonPropNode.stringValue()), RDF.FIRST, -
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128084#comment-16128084 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133311778 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -220,163 +229,163 @@ public void refreshGraph() throws InferenceEngineException { } } inverseOfMap = invProp; - -ValueFactory vf = ValueFactoryImpl.getInstance(); -iter = RyaDAOHelper.query(ryaDAO, null, - vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), - null, conf); -MappropertyChainPropertiesToBNodes = new HashMap (); -propertyChainPropertyToChain = new HashMap (); + +final ValueFactory vf = ValueFactoryImpl.getInstance(); +iter = RyaDAOHelper.query(ryaDAO, null, + vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), +null, conf); +final Map propertyChainPropertiesToBNodes = new HashMap<>(); +propertyChainPropertyToChain = new HashMap<>(); try { - while (iter.hasNext()){ - Statement st = iter.next(); - propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); - } +while (iter.hasNext()){ +final Statement st = iter.next(); + propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); +} } finally { if (iter != null) { iter.close(); } } // now for each property chain bNode, get the indexed list of properties associated with that chain -for (URI propertyChainProperty : propertyChainPropertiesToBNodes.keySet()){ - URI bNode = propertyChainPropertiesToBNodes.get(propertyChainProperty); - // query for the list of indexed properties - iter = RyaDAOHelper.query(ryaDAO, bNode, vf.createURI("http://www.w3.org/2000/10/swap/list#index;), - null, conf); - TreeMap orderedProperties = new TreeMap (); - // TODO refactor this. Wish I could execute sparql - try { - while (iter.hasNext()){ - Statement st = iter.next(); - String indexedElement = st.getObject().stringValue(); - System.out.println(indexedElement); - CloseableIteration iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.FIRST, - null, conf); - String integerValue = ""; - Value anonPropNode = null; - Value propURI = null; - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - integerValue = iter2Statement.getObject().stringValue(); - break; - } - iter2.close(); - } - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.REST, - null, conf); - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - anonPropNode = iter2Statement.getObject(); - break; - } - iter2.close(); - if (anonPropNode != null){ - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(anonPropNode.stringValue()), RDF.FIRST, -
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128088#comment-16128088 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133319932 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -416,22 +425,131 @@ private void refreshHasValueRestrictions(Maprestrictions) throws } } -private static Vertex getVertex(Graph graph, Object id) { -Iterator it = graph.vertices(id.toString()); +private void refreshIntersectionOf() throws QueryEvaluationException { +final Map > intersectionsProp = new HashMap<>(); + +// First query for all the owl:intersectionOf's. +// If we have the following intersectionOf: +// :A owl:intersectionOf[:B, :C] +// It will be represented by triples following a pattern similar to: +// <:A> owl:intersectionOf _:bnode1 . +// _:bnode1 rdf:first <:B> . +// _:bnode1 rdf:rest _:bnode2 . +// _:bnode2 rdf:first <:C> . +// _:bnode2 rdf:rest rdf:nil . +ryaDaoQueryWrapper.queryAll(null, OWL.INTERSECTIONOF, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st1) throws Exception { +final Resource type = st1.getSubject(); +// head will point to a type that is part of the intersection. +URI head = (URI) st1.getObject(); +if (!intersectionsProp.containsKey(type)) { +intersectionsProp.put(type, new ArrayList ()); +} +final Set intersection = new HashSet<>(); +// Go through and find all bnodes that are part of the defined +// intersection. +while (!RDF.NIL.equals(head)) { +// rdf.first will point to a type item that is in the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.FIRST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st2) throws Exception{ +// The object found in the query represents a type +// that should be included in the intersection. +final URI obj2 = (URI) st2.getObject(); +intersection.add(obj2); +} +}); +final List headHolder = new ArrayList<>(1); +// rdf.rest will point to the next bnode that's part of the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.REST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st3) throws Exception { +// This object is the next bnode head to look for. +final URI obj3 = (URI) st3.getObject(); +headHolder.add(obj3); +} +}); +// As long as we get a new head there are more bnodes that +// are part of the intersection. Keep going until we reach +// rdf.nil. +if (!headHolder.isEmpty()) { +head = headHolder.get(0); +} else { +head = RDF.NIL; +} +} +// Add this intersection for this type. There may be more +// intersections for this type so each type has a list of +// intersection sets. +intersectionsProp.get(type).add(intersection); +} +}); + +for (final Map.Entry > entry : intersectionsProp.entrySet()) { +final Resource type = entry.getKey(); +final List intersectionList = entry.getValue(); +final Set otherTypes = new HashSet<>(); +// Combine all of a type's intersections together. +for (final Set intersection : intersectionList) { +otherTypes.addAll(intersection); +} +for (final Resource other : otherTypes) { +// :A
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128089#comment-16128089 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133323192 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -467,126 +585,180 @@ private static void addParents(Vertex v, Set parents) { }); } -public boolean isSymmetricProperty(URI prop) { +public boolean isSymmetricProperty(final URI prop) { return (symmetricPropertySet != null) && symmetricPropertySet.contains(prop); } -public URI findInverseOf(URI prop) { +public URI findInverseOf(final URI prop) { return (inverseOfMap != null) ? inverseOfMap.get(prop) : (null); } -public boolean isTransitiveProperty(URI prop) { +public boolean isTransitiveProperty(final URI prop) { return (transitivePropertySet != null) && transitivePropertySet.contains(prop); } /** * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go */ -public Set findTransitiveProperty(Resource subj, URI prop, Value obj, Resource... contxts) throws InferenceEngineException { +public Set findTransitiveProperty(final Resource subj, final URI prop, final Value obj, final Resource... contxts) throws InferenceEngineException { if (transitivePropertySet.contains(prop)) { -Set sts = new HashSet(); -boolean goUp = subj == null; +final Set sts = new HashSet<>(); +final boolean goUp = subj == null; chainTransitiveProperty(subj, prop, obj, (goUp) ? (obj) : (subj), sts, goUp, contxts); return sts; -} else +} else { return null; +} } /** * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go */ -public Set findSameAs(Resource value, Resource... contxts) throws InferenceEngineException{ - Set sameAs = new HashSet(); - sameAs.add(value); - findSameAsChaining(value, sameAs, contxts); - return sameAs; +public Set findSameAs(final Resource value, final Resource... contxts) throws InferenceEngineException{ +final Set sameAs = new HashSet(); +sameAs.add(value); +findSameAsChaining(value, sameAs, contxts); +return sameAs; +} + +public CloseableIterationqueryDao(final Resource subject, final URI predicate, final Value object, final Resource... contexts) throws QueryEvaluationException { +return RyaDAOHelper.query(ryaDAO, subject, predicate, object, conf, contexts); } /** * TODO: This chaining can be slow at query execution. the other option is to perform this in the query itself, but that will be constrained to how many levels we decide to go */ -public void findSameAsChaining(Resource subj, Set currentSameAs, Resource[] contxts) throws InferenceEngineException{ +public void findSameAsChaining(final Resource subj, final Set currentSameAs, final Resource[] contxts) throws InferenceEngineException{ +CloseableIteration subjIter = null; +CloseableIteration objIter = null; try { - CloseableIteration subjIter = RyaDAOHelper.query(ryaDAO, subj, OWL.SAMEAS, null, conf, contxts); - while (subjIter.hasNext()){ - Statement st = subjIter.next(); - if (!currentSameAs.contains(st.getObject())){ - Resource castedObj = (Resource) st.getObject(); - currentSameAs.add(castedObj); - findSameAsChaining(castedObj, currentSameAs, contxts); - } - } - subjIter.close(); - CloseableIteration objIter = RyaDAOHelper.query(ryaDAO, null, OWL.SAMEAS, subj, conf, contxts); - while (objIter.hasNext()){ - Statement st =
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128085#comment-16128085 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133321220 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -416,22 +425,131 @@ private void refreshHasValueRestrictions(Maprestrictions) throws } } -private static Vertex getVertex(Graph graph, Object id) { -Iterator it = graph.vertices(id.toString()); +private void refreshIntersectionOf() throws QueryEvaluationException { +final Map > intersectionsProp = new HashMap<>(); + +// First query for all the owl:intersectionOf's. +// If we have the following intersectionOf: +// :A owl:intersectionOf[:B, :C] +// It will be represented by triples following a pattern similar to: +// <:A> owl:intersectionOf _:bnode1 . +// _:bnode1 rdf:first <:B> . +// _:bnode1 rdf:rest _:bnode2 . +// _:bnode2 rdf:first <:C> . +// _:bnode2 rdf:rest rdf:nil . +ryaDaoQueryWrapper.queryAll(null, OWL.INTERSECTIONOF, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st1) throws Exception { +final Resource type = st1.getSubject(); +// head will point to a type that is part of the intersection. +URI head = (URI) st1.getObject(); +if (!intersectionsProp.containsKey(type)) { +intersectionsProp.put(type, new ArrayList ()); +} +final Set intersection = new HashSet<>(); +// Go through and find all bnodes that are part of the defined +// intersection. +while (!RDF.NIL.equals(head)) { +// rdf.first will point to a type item that is in the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.FIRST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st2) throws Exception{ +// The object found in the query represents a type +// that should be included in the intersection. +final URI obj2 = (URI) st2.getObject(); +intersection.add(obj2); +} +}); +final List headHolder = new ArrayList<>(1); +// rdf.rest will point to the next bnode that's part of the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.REST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st3) throws Exception { +// This object is the next bnode head to look for. +final URI obj3 = (URI) st3.getObject(); +headHolder.add(obj3); +} +}); +// As long as we get a new head there are more bnodes that +// are part of the intersection. Keep going until we reach +// rdf.nil. +if (!headHolder.isEmpty()) { +head = headHolder.get(0); +} else { +head = RDF.NIL; +} +} +// Add this intersection for this type. There may be more +// intersections for this type so each type has a list of +// intersection sets. +intersectionsProp.get(type).add(intersection); +} +}); + +for (final Map.Entry > entry : intersectionsProp.entrySet()) { +final Resource type = entry.getKey(); +final List intersectionList = entry.getValue(); +final Set otherTypes = new HashSet<>(); +// Combine all of a type's intersections together. +for (final Set intersection : intersectionList) { +otherTypes.addAll(intersection); +} +for (final Resource other : otherTypes) { +// :A
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128090#comment-16128090 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133329139 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/persist/utils/RyaDaoQueryWrapper.java --- @@ -0,0 +1,179 @@ +/* + * 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.persist.utils; + +import static com.google.common.base.Preconditions.checkNotNull; + +import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import org.apache.rya.api.domain.RyaStatement; +import org.apache.rya.api.persist.RyaDAO; +import org.apache.rya.api.resolver.RyaToRdfConversions; +import org.openrdf.model.Resource; +import org.openrdf.model.Statement; +import org.openrdf.model.URI; +import org.openrdf.model.Value; +import org.openrdf.query.QueryEvaluationException; + +import info.aduna.iteration.CloseableIteration; + +/** + * Wraps Rya DAO queries into a simpler interface that just passes in the + * statement to query for and a handler for dealing with each statement in the + * query result. This handles iterating over the query, throwing any exceptions, + * and closing the query iterator when done. The same wrapper can be re-used + * for multiple queries. + */ +public class RyaDaoQueryWrapper { +private final RyaDAO ryaDao; +private final RdfCloudTripleStoreConfiguration conf; + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + * @param conf the {@link RdfCloudTripleStoreConfiguration}. + * (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao, final RdfCloudTripleStoreConfiguration conf) { +this.ryaDao = checkNotNull(ryaDao); +this.conf = checkNotNull(conf); +} + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao) { +this(checkNotNull(ryaDao), ryaDao.getConf()); +} + +/** + * Handles all results of a query. Closes the query iterator when done. + * @param subject the subject {@link Resource} to query for. + * @param predicate the predicate {@link URI} to query for. + * @param object the object {@link Value} to query for. + * @param ryaDaoStatementIterHandler the {@link RyaDaoStatementIterHandler} + * to use for handling each statement returned. (not {@code null}) + * @param contexts the context {@link Resource}s to query for. + * @throws QueryEvaluationException + */ +public void queryAll(final Resource subject, final URI predicate, final Value object, final RyaDaoStatementIterHandler ryaDaoStatementIterHandler, final Resource... contexts) throws QueryEvaluationException { --- End diff -- Would it make sense to use the org.openrdf.rio.RDFHandler interface (and RDFHandlerBase) instead of a new handler class? That would let someone directly pass in something like an RDFWriter, if that were ever useful for something. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128083#comment-16128083 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133308682 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/IntersectionOfVisitor.java --- @@ -0,0 +1,159 @@ +/* + * 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.rdftriplestore.inference; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import org.openrdf.model.Resource; +import org.openrdf.model.URI; +import org.openrdf.model.vocabulary.RDF; +import org.openrdf.query.algebra.StatementPattern; +import org.openrdf.query.algebra.TupleExpr; +import org.openrdf.query.algebra.Union; +import org.openrdf.query.algebra.Var; + +/** + * Visitor for handling owl:intersectionOf inferencing on a node. + */ +public class IntersectionOfVisitor extends AbstractInferVisitor { +private static final Logger log = Logger.getLogger(IntersectionOfVisitor.class); + +/** + * Creates a new instance of {@link IntersectionOfVisitor}. + * @param conf the {@link RdfCloudeTripleStoreConfiguration}. + * @param inferenceEngine the {@link InferenceEngine}. + */ +public IntersectionOfVisitor(final RdfCloudTripleStoreConfiguration conf, final InferenceEngine inferenceEngine) { +super(conf, inferenceEngine); +include = true; +} + +@Override +protected void meetSP(final StatementPattern node) throws Exception { +final StatementPattern currentNode = node.clone(); +final Var subVar = node.getSubjectVar(); +final Var predVar = node.getPredicateVar(); +final Var objVar = node.getObjectVar(); +final Var conVar = node.getContextVar(); +if (predVar != null && objVar != null && objVar.getValue() != null && RDF.TYPE.equals(predVar.getValue()) && !EXPANDED.equals(conVar)) { +final Listintersections = inferenceEngine.getIntersectionsImplying((URI) objVar.getValue()); +if (intersections != null && !intersections.isEmpty()) { +final Set combinedIntersections = new TreeSet<>(new ResourceComparator()); --- End diff -- If there are multiple intersections associated with the same type, I think we want to treat each intersection as a sufficient condition for inferring the type, and union their separate join trees together, rather than combining all the types into one join tree. E.g. if we have: A intersectionOf (B C) and A intersectionOf (D E F) then I think the right interpretation is: A == (B intersect C) == (D intersect E intersect F). So an individual x is a member of A if: (x is an A) OR (x is a B and a C) OR (x is a D and an E and an F). So the query tree would be something like: - Union - Union - Join - (x is a B) - (x is a C) - Join - Join - (x is a D) - (x is an E) - (x is an F) - (x is an A) > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128087#comment-16128087 ] ASF GitHub Bot commented on RYA-292: Github user jessehatfield commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133310947 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -220,163 +229,163 @@ public void refreshGraph() throws InferenceEngineException { } } inverseOfMap = invProp; - -ValueFactory vf = ValueFactoryImpl.getInstance(); -iter = RyaDAOHelper.query(ryaDAO, null, - vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), - null, conf); -MappropertyChainPropertiesToBNodes = new HashMap (); -propertyChainPropertyToChain = new HashMap (); + +final ValueFactory vf = ValueFactoryImpl.getInstance(); +iter = RyaDAOHelper.query(ryaDAO, null, + vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), +null, conf); +final Map propertyChainPropertiesToBNodes = new HashMap<>(); +propertyChainPropertyToChain = new HashMap<>(); try { - while (iter.hasNext()){ - Statement st = iter.next(); - propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); - } +while (iter.hasNext()){ +final Statement st = iter.next(); + propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); +} } finally { if (iter != null) { iter.close(); } } // now for each property chain bNode, get the indexed list of properties associated with that chain -for (URI propertyChainProperty : propertyChainPropertiesToBNodes.keySet()){ - URI bNode = propertyChainPropertiesToBNodes.get(propertyChainProperty); - // query for the list of indexed properties - iter = RyaDAOHelper.query(ryaDAO, bNode, vf.createURI("http://www.w3.org/2000/10/swap/list#index;), - null, conf); - TreeMap orderedProperties = new TreeMap (); - // TODO refactor this. Wish I could execute sparql - try { - while (iter.hasNext()){ - Statement st = iter.next(); - String indexedElement = st.getObject().stringValue(); - System.out.println(indexedElement); - CloseableIteration iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.FIRST, - null, conf); - String integerValue = ""; - Value anonPropNode = null; - Value propURI = null; - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - integerValue = iter2Statement.getObject().stringValue(); - break; - } - iter2.close(); - } - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.REST, - null, conf); - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - anonPropNode = iter2Statement.getObject(); - break; - } - iter2.close(); - if (anonPropNode != null){ - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(anonPropNode.stringValue()), RDF.FIRST, -
[jira] [Commented] (RYA-250) Smart URI avoid data duplication
[ https://issues.apache.org/jira/browse/RYA-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16127312#comment-16127312 ] ASF GitHub Bot commented on RYA-250: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/153 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/391/ > Smart URI avoid data duplication > > > Key: RYA-250 > URL: https://issues.apache.org/jira/browse/RYA-250 > Project: Rya > Issue Type: Task > Components: dao >Affects Versions: 3.2.10 >Reporter: Eric White >Assignee: Eric White > Fix For: 3.2.10 > > > Implement Smart URI methods for avoiding data duplication. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128936#comment-16128936 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133458153 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/PushJoinDownVisitor.java --- @@ -30,26 +30,26 @@ * Date: Apr 11, 2011 * Time: 10:16:15 PM */ -public class PushJoinDownVisitor extends QueryModelVisitorBase { +public class PushJoinDownVisitor extends QueryModelVisitorBase { @Override -public void meet(Join node) throws Exception { +public void meet(final Join node) throws Exception { --- End diff -- Same as above. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128938#comment-16128938 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133465643 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -416,22 +425,131 @@ private void refreshHasValueRestrictions(Maprestrictions) throws } } -private static Vertex getVertex(Graph graph, Object id) { -Iterator it = graph.vertices(id.toString()); +private void refreshIntersectionOf() throws QueryEvaluationException { +final Map > intersectionsProp = new HashMap<>(); + +// First query for all the owl:intersectionOf's. +// If we have the following intersectionOf: +// :A owl:intersectionOf[:B, :C] +// It will be represented by triples following a pattern similar to: +// <:A> owl:intersectionOf _:bnode1 . +// _:bnode1 rdf:first <:B> . +// _:bnode1 rdf:rest _:bnode2 . +// _:bnode2 rdf:first <:C> . +// _:bnode2 rdf:rest rdf:nil . --- End diff -- Thanks for documenting this. It really helps clarify the logic. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128944#comment-16128944 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133462254 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -220,163 +229,163 @@ public void refreshGraph() throws InferenceEngineException { } } inverseOfMap = invProp; - -ValueFactory vf = ValueFactoryImpl.getInstance(); -iter = RyaDAOHelper.query(ryaDAO, null, - vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), - null, conf); -MappropertyChainPropertiesToBNodes = new HashMap (); -propertyChainPropertyToChain = new HashMap (); + +final ValueFactory vf = ValueFactoryImpl.getInstance(); +iter = RyaDAOHelper.query(ryaDAO, null, + vf.createURI("http://www.w3.org/2002/07/owl#propertyChainAxiom;), +null, conf); +final Map propertyChainPropertiesToBNodes = new HashMap<>(); +propertyChainPropertyToChain = new HashMap<>(); try { - while (iter.hasNext()){ - Statement st = iter.next(); - propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); - } +while (iter.hasNext()){ +final Statement st = iter.next(); + propertyChainPropertiesToBNodes.put((URI)st.getSubject(), (URI)st.getObject()); +} } finally { if (iter != null) { iter.close(); } } // now for each property chain bNode, get the indexed list of properties associated with that chain -for (URI propertyChainProperty : propertyChainPropertiesToBNodes.keySet()){ - URI bNode = propertyChainPropertiesToBNodes.get(propertyChainProperty); - // query for the list of indexed properties - iter = RyaDAOHelper.query(ryaDAO, bNode, vf.createURI("http://www.w3.org/2000/10/swap/list#index;), - null, conf); - TreeMap orderedProperties = new TreeMap (); - // TODO refactor this. Wish I could execute sparql - try { - while (iter.hasNext()){ - Statement st = iter.next(); - String indexedElement = st.getObject().stringValue(); - System.out.println(indexedElement); - CloseableIteration iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.FIRST, - null, conf); - String integerValue = ""; - Value anonPropNode = null; - Value propURI = null; - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - integerValue = iter2Statement.getObject().stringValue(); - break; - } - iter2.close(); - } - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(st.getObject().stringValue()), RDF.REST, - null, conf); - if (iter2 != null){ - while (iter2.hasNext()){ - Statement iter2Statement = iter2.next(); - anonPropNode = iter2Statement.getObject(); - break; - } - iter2.close(); - if (anonPropNode != null){ - iter2 = RyaDAOHelper.query(ryaDAO, vf.createURI(anonPropNode.stringValue()), RDF.FIRST, -
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128946#comment-16128946 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133478457 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -416,22 +425,131 @@ private void refreshHasValueRestrictions(Maprestrictions) throws } } -private static Vertex getVertex(Graph graph, Object id) { -Iterator it = graph.vertices(id.toString()); +private void refreshIntersectionOf() throws QueryEvaluationException { +final Map > intersectionsProp = new HashMap<>(); + +// First query for all the owl:intersectionOf's. +// If we have the following intersectionOf: +// :A owl:intersectionOf[:B, :C] +// It will be represented by triples following a pattern similar to: +// <:A> owl:intersectionOf _:bnode1 . +// _:bnode1 rdf:first <:B> . +// _:bnode1 rdf:rest _:bnode2 . +// _:bnode2 rdf:first <:C> . +// _:bnode2 rdf:rest rdf:nil . +ryaDaoQueryWrapper.queryAll(null, OWL.INTERSECTIONOF, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st1) throws Exception { +final Resource type = st1.getSubject(); +// head will point to a type that is part of the intersection. +URI head = (URI) st1.getObject(); +if (!intersectionsProp.containsKey(type)) { +intersectionsProp.put(type, new ArrayList ()); +} +final Set intersection = new HashSet<>(); +// Go through and find all bnodes that are part of the defined +// intersection. +while (!RDF.NIL.equals(head)) { +// rdf.first will point to a type item that is in the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.FIRST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st2) throws Exception{ +// The object found in the query represents a type +// that should be included in the intersection. +final URI obj2 = (URI) st2.getObject(); +intersection.add(obj2); +} +}); +final List headHolder = new ArrayList<>(1); +// rdf.rest will point to the next bnode that's part of the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.REST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st3) throws Exception { +// This object is the next bnode head to look for. +final URI obj3 = (URI) st3.getObject(); +headHolder.add(obj3); +} +}); +// As long as we get a new head there are more bnodes that +// are part of the intersection. Keep going until we reach +// rdf.nil. +if (!headHolder.isEmpty()) { +head = headHolder.get(0); +} else { +head = RDF.NIL; +} +} +// Add this intersection for this type. There may be more +// intersections for this type so each type has a list of +// intersection sets. +intersectionsProp.get(type).add(intersection); +} +}); + +for (final Map.Entry > entry : intersectionsProp.entrySet()) { +final Resource type = entry.getKey(); +final List intersectionList = entry.getValue(); +final Set otherTypes = new HashSet<>(); +// Combine all of a type's intersections together. +for (final Set intersection : intersectionList) { +otherTypes.addAll(intersection); +} +for (final Resource other : otherTypes) { +// :A
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128940#comment-16128940 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133458015 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/FilterRangeVisitor.java --- @@ -27,63 +33,62 @@ import org.openrdf.model.Value; import org.openrdf.model.impl.BooleanLiteralImpl; import org.openrdf.query.QueryEvaluationException; -import org.openrdf.query.algebra.*; +import org.openrdf.query.algebra.Filter; +import org.openrdf.query.algebra.FunctionCall; +import org.openrdf.query.algebra.StatementPattern; +import org.openrdf.query.algebra.ValueConstant; +import org.openrdf.query.algebra.ValueExpr; +import org.openrdf.query.algebra.Var; import org.openrdf.query.algebra.helpers.QueryModelVisitorBase; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.apache.rya.api.RdfCloudTripleStoreConstants.RANGE; - /** * Class FilterTimeIndexVisitor * Date: Apr 11, 2011 * Time: 10:16:15 PM */ -public class FilterRangeVisitor extends QueryModelVisitorBase { +public class FilterRangeVisitor extends QueryModelVisitorBase { -private RdfCloudTripleStoreConfiguration conf; -private Map rangeValues = new HashMap(); +private final RdfCloudTripleStoreConfiguration conf; +private final Map rangeValues = new HashMap(); -public FilterRangeVisitor(RdfCloudTripleStoreConfiguration conf) { +public FilterRangeVisitor(final RdfCloudTripleStoreConfiguration conf) { this.conf = conf; } @Override -public void meet(Filter node) throws Exception { +public void meet(final Filter node) throws Exception { --- End diff -- Were any substantive changes made to this file? Seems like you just added final everywhere. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128947#comment-16128947 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133455337 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/persist/utils/RyaDaoStatementIterHandler.java --- @@ -0,0 +1,35 @@ +/* + * 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.persist.utils; + +import org.apache.rya.api.persist.RyaDAO; +import org.openrdf.model.Statement; + +/** + * Handles the statements returned from a {@link RyaDAO} query iterator. + */ +public abstract class RyaDaoStatementIterHandler { --- End diff -- Use the RDFHandler interface. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128945#comment-16128945 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133467895 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -416,22 +425,131 @@ private void refreshHasValueRestrictions(Maprestrictions) throws } } -private static Vertex getVertex(Graph graph, Object id) { -Iterator it = graph.vertices(id.toString()); +private void refreshIntersectionOf() throws QueryEvaluationException { +final Map > intersectionsProp = new HashMap<>(); + +// First query for all the owl:intersectionOf's. +// If we have the following intersectionOf: +// :A owl:intersectionOf[:B, :C] +// It will be represented by triples following a pattern similar to: +// <:A> owl:intersectionOf _:bnode1 . +// _:bnode1 rdf:first <:B> . +// _:bnode1 rdf:rest _:bnode2 . +// _:bnode2 rdf:first <:C> . +// _:bnode2 rdf:rest rdf:nil . +ryaDaoQueryWrapper.queryAll(null, OWL.INTERSECTIONOF, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st1) throws Exception { +final Resource type = st1.getSubject(); +// head will point to a type that is part of the intersection. +URI head = (URI) st1.getObject(); +if (!intersectionsProp.containsKey(type)) { +intersectionsProp.put(type, new ArrayList ()); +} +final Set intersection = new HashSet<>(); +// Go through and find all bnodes that are part of the defined +// intersection. +while (!RDF.NIL.equals(head)) { +// rdf.first will point to a type item that is in the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.FIRST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st2) throws Exception{ +// The object found in the query represents a type +// that should be included in the intersection. +final URI obj2 = (URI) st2.getObject(); +intersection.add(obj2); +} +}); +final List headHolder = new ArrayList<>(1); +// rdf.rest will point to the next bnode that's part of the +// intersection. +ryaDaoQueryWrapper.queryFirst(head, RDF.REST, null, new RyaDaoStatementIterHandler() { +@Override +public void handleStatementIter(final Statement st3) throws Exception { +// This object is the next bnode head to look for. +final URI obj3 = (URI) st3.getObject(); +headHolder.add(obj3); +} +}); +// As long as we get a new head there are more bnodes that +// are part of the intersection. Keep going until we reach +// rdf.nil. +if (!headHolder.isEmpty()) { +head = headHolder.get(0); +} else { +head = RDF.NIL; +} +} +// Add this intersection for this type. There may be more +// intersections for this type so each type has a list of +// intersection sets. +intersectionsProp.get(type).add(intersection); --- End diff -- Thanks for clarifying the need for the list of sets. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}}
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128943#comment-16128943 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133458754 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/ReorderJoinVisitor.java --- @@ -31,24 +31,24 @@ * Date: Apr 11, 2011 * Time: 10:16:15 PM */ -public class ReorderJoinVisitor extends QueryModelVisitorBase { +public class ReorderJoinVisitor extends QueryModelVisitorBase { --- End diff -- Same as above. Looks like you just added final everywhere. Was this intentional or just a by-product of your eclipse formatting settings? Are these visitors important for the intersectionOf query expansion? Seems like that would just use the subClass visitor. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128941#comment-16128941 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133450932 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/persist/utils/RyaDaoQueryWrapper.java --- @@ -0,0 +1,179 @@ +/* + * 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.persist.utils; + +import static com.google.common.base.Preconditions.checkNotNull; + +import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import org.apache.rya.api.domain.RyaStatement; +import org.apache.rya.api.persist.RyaDAO; +import org.apache.rya.api.resolver.RyaToRdfConversions; +import org.openrdf.model.Resource; +import org.openrdf.model.Statement; +import org.openrdf.model.URI; +import org.openrdf.model.Value; +import org.openrdf.query.QueryEvaluationException; + +import info.aduna.iteration.CloseableIteration; + +/** + * Wraps Rya DAO queries into a simpler interface that just passes in the + * statement to query for and a handler for dealing with each statement in the + * query result. This handles iterating over the query, throwing any exceptions, + * and closing the query iterator when done. The same wrapper can be re-used + * for multiple queries. + */ +public class RyaDaoQueryWrapper { +private final RyaDAO ryaDao; +private final RdfCloudTripleStoreConfiguration conf; + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + * @param conf the {@link RdfCloudTripleStoreConfiguration}. + * (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao, final RdfCloudTripleStoreConfiguration conf) { +this.ryaDao = checkNotNull(ryaDao); +this.conf = checkNotNull(conf); +} + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao) { +this(checkNotNull(ryaDao), ryaDao.getConf()); +} + +/** + * Handles all results of a query. Closes the query iterator when done. + * @param subject the subject {@link Resource} to query for. + * @param predicate the predicate {@link URI} to query for. + * @param object the object {@link Value} to query for. + * @param ryaDaoStatementIterHandler the {@link RyaDaoStatementIterHandler} + * to use for handling each statement returned. (not {@code null}) + * @param contexts the context {@link Resource}s to query for. + * @throws QueryEvaluationException + */ +public void queryAll(final Resource subject, final URI predicate, final Value object, final RyaDaoStatementIterHandler ryaDaoStatementIterHandler, final Resource... contexts) throws QueryEvaluationException { +checkNotNull(ryaDaoStatementIterHandler); +final CloseableIterationiter = RyaDAOHelper.query(ryaDao, subject, predicate, object, conf, contexts); +try { +while (iter.hasNext()) { +final Statement statement = iter.next(); +try { + ryaDaoStatementIterHandler.handleStatementIter(statement); +} catch (final Exception e) { +throw new QueryEvaluationException("Error handling statement.", e); +} +} +} finally { +if (iter != null) { +iter.close(); +} +} +} + +/** + * Handles all results of a query. Closes the query iterator when
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128937#comment-16128937 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133461212 --- Diff: sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java --- @@ -178,11 +183,15 @@ public void refreshGraph() throws InferenceEngineException { subPropertyOfGraph = graph; //TODO: Should this be synchronized? + +refreshIntersectionOf(); --- End diff -- Awesome! Thanks for separating out the intersection refresh logic here. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x rdf:type :Mother}} (the intersection type) to > check for resources that have both types {{:Parent}} and {{:Woman}} (as well > as check for resources that are explicitly stated to be {{:Mother}} s) > 2. Rewrite query patterns {{?y rdf:type :Parent}} (one of the intersecting > sets) to check for resources that are stated to be either {{:Mother}} or > {{:Parent}} , since belonging to the intersection type implies membership in > the component types. (Equivalent logic applies to {{Woman}} ) -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-292) Implement owl:intersectionOf inference
[ https://issues.apache.org/jira/browse/RYA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128942#comment-16128942 ] ASF GitHub Bot commented on RYA-292: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/206#discussion_r133448942 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/persist/utils/RyaDaoQueryWrapper.java --- @@ -0,0 +1,179 @@ +/* + * 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.persist.utils; + +import static com.google.common.base.Preconditions.checkNotNull; + +import org.apache.rya.api.RdfCloudTripleStoreConfiguration; +import org.apache.rya.api.domain.RyaStatement; +import org.apache.rya.api.persist.RyaDAO; +import org.apache.rya.api.resolver.RyaToRdfConversions; +import org.openrdf.model.Resource; +import org.openrdf.model.Statement; +import org.openrdf.model.URI; +import org.openrdf.model.Value; +import org.openrdf.query.QueryEvaluationException; + +import info.aduna.iteration.CloseableIteration; + +/** + * Wraps Rya DAO queries into a simpler interface that just passes in the + * statement to query for and a handler for dealing with each statement in the + * query result. This handles iterating over the query, throwing any exceptions, + * and closing the query iterator when done. The same wrapper can be re-used + * for multiple queries. + */ +public class RyaDaoQueryWrapper { +private final RyaDAO ryaDao; +private final RdfCloudTripleStoreConfiguration conf; + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + * @param conf the {@link RdfCloudTripleStoreConfiguration}. + * (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao, final RdfCloudTripleStoreConfiguration conf) { +this.ryaDao = checkNotNull(ryaDao); +this.conf = checkNotNull(conf); +} + +/** + * Creates a new instance of {@link RyaDaoQueryWrapper}. + * @param ryaDao the {@link RyaDAO}. (not {@code null}) + */ +public RyaDaoQueryWrapper(final RyaDAO ryaDao) { +this(checkNotNull(ryaDao), ryaDao.getConf()); +} + +/** + * Handles all results of a query. Closes the query iterator when done. + * @param subject the subject {@link Resource} to query for. + * @param predicate the predicate {@link URI} to query for. + * @param object the object {@link Value} to query for. + * @param ryaDaoStatementIterHandler the {@link RyaDaoStatementIterHandler} + * to use for handling each statement returned. (not {@code null}) + * @param contexts the context {@link Resource}s to query for. + * @throws QueryEvaluationException + */ +public void queryAll(final Resource subject, final URI predicate, final Value object, final RyaDaoStatementIterHandler ryaDaoStatementIterHandler, final Resource... contexts) throws QueryEvaluationException { --- End diff -- Yeah, I agree with Jesse here. We should avoid creating interfaces/classes that provide the same functionality as preexisting interfaces/classes. Use the RDFHandler here. > Implement owl:intersectionOf inference > -- > > Key: RYA-292 > URL: https://issues.apache.org/jira/browse/RYA-292 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Eric White > > An *{{owl:intersectionOf}}* expression defines the set of resources who > belong to all of a particular set of classes. > A basic implementation, if the ontology states that {{:Mother}} is the > intersection of {{:Parent}} and {{:Woman}}, should cause the inference engine > to: > 1. Rewrite query patterns {{?x
[jira] [Commented] (RYA-343) AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table.
[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128961#comment-16128961 ] ASF GitHub Bot commented on RYA-343: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/205#discussion_r133485762 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/instance/RyaDetailsToConfiguration.java --- @@ -53,14 +53,16 @@ public static void addRyaDetailsToConfiguration(final RyaDetails details, final checkAndSet(conf, ConfigurationFields.USE_FREETEXT, details.getFreeTextIndexDetails().isEnabled()); //RYA-215checkAndSet(conf, ConfigurationFields.USE_GEO, details.getGeoIndexDetails().isEnabled()); checkAndSet(conf, ConfigurationFields.USE_TEMPORAL, details.getTemporalIndexDetails().isEnabled()); -PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); - if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); - conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); - conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); - } else { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); - } +final PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); +if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { +checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); +conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); +conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); +conf.set(ConfigurationFields.PCJ_STORAGE_TYPE, "ACCUMULO"); +} else { +checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); +conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "NO_UPDATE"); --- End diff -- This issue has been created https://issues.apache.org/jira/browse/RYA-344. > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at > org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127) > at > org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533) > at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.IllegalArgumentException: The > 'rya.indexing.pcj.storageType' property must have one of the following > values: [ACCUMULO] > at > com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) > at >
[jira] [Commented] (RYA-343) AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table.
[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128837#comment-16128837 ] ASF GitHub Bot commented on RYA-343: Github user jdasch commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/205#discussion_r133458983 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/instance/RyaDetailsToConfiguration.java --- @@ -53,14 +53,16 @@ public static void addRyaDetailsToConfiguration(final RyaDetails details, final checkAndSet(conf, ConfigurationFields.USE_FREETEXT, details.getFreeTextIndexDetails().isEnabled()); //RYA-215checkAndSet(conf, ConfigurationFields.USE_GEO, details.getGeoIndexDetails().isEnabled()); checkAndSet(conf, ConfigurationFields.USE_TEMPORAL, details.getTemporalIndexDetails().isEnabled()); -PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); - if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); - conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); - conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); - } else { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); - } +final PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); +if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { +checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); +conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); +conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); +conf.set(ConfigurationFields.PCJ_STORAGE_TYPE, "ACCUMULO"); +} else { +checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); +conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "NO_UPDATE"); --- End diff -- I completely agree with you on not using the String literals. Unfortunately `PrecomputedJoinUpdaterType` is in rya.indexing and `RyaDetailsToConfiguration` is in rya.api, so I can't access that type. I believe (could be wrong) that Caleb had the action item to create (or reference) a JIRA that would enhance the `PCJIndexDetails` class to have a `PCJIndexDetails.getUpdaterType()` and `PCJIndexDetails.getStorageType()` methods, or perhaps we might go in some other direction with the implementation. > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at > org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127) > at >
[jira] [Commented] (RYA-293) Implement owl:unionOf inference
[ https://issues.apache.org/jira/browse/RYA-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16128813#comment-16128813 ] ASF GitHub Bot commented on RYA-293: Github user asfgit closed the pull request at: https://github.com/apache/incubator-rya/pull/180 > 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-297) Implement owl:equivalentClass inference
[ https://issues.apache.org/jira/browse/RYA-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16129006#comment-16129006 ] ASF GitHub Bot commented on RYA-297: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/184 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/400/ > Implement owl:equivalentClass inference > --- > > Key: RYA-297 > URL: https://issues.apache.org/jira/browse/RYA-297 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Jesse Hatfield > > An *{{owl:equivalentClass}}* statement is equivalent to stating that two > classes are each subclasses of the other. > The inference engine already supports subclass reasoning, but appears not to > check for equivalent class statements. This can likely be handled by adding > the relationship to the subclass graph in both directions, as seems to be > done for equivalent properties. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-343) AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table.
[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126273#comment-16126273 ] ASF GitHub Bot commented on RYA-343: GitHub user jdasch opened a pull request: https://github.com/apache/incubator-rya/pull/205 RYA-343 Fixed rya.api connection issue for PCJ-enabled rya table. ## Description Added a couple configs that weren't getting set and caused a regression. Purpose of this PR is to get a fix in place now. We should probably make a new JIRA to ensure this regression is captured by an IT and to expand PCJDetails to store/retrieve this information. ### Tests None. ### Links [Jira: RYA-343](https://issues.apache.org/jira/browse/RYA-343) ### 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-343 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rya/pull/205.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 #205 commit 81477c5815f3f54a3ccd5d32e87e6692461b32a9 Author: jdaschDate: 2017-08-14T19:21:10Z RYA-343 Fixed rya.api connection issue for PCJ-enabled rya table. > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at > org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127) > at > org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533) > at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.IllegalArgumentException: The > 'rya.indexing.pcj.storageType' property must have one of the following > values: [ACCUMULO] > at > com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) > at > org.apache.rya.indexing.external.PrecomputedJoinStorageSupplier.get(PrecomputedJoinStorageSupplier.java:68) > at > org.apache.rya.indexing.external.PrecomputedJoinIndexer.init(PrecomputedJoinIndexer.java:139) > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:156) > ... 16 more > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-343) AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table.
[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126315#comment-16126315 ] ASF GitHub Bot commented on RYA-343: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/205 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/388/ > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at > org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:127) > at > org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533) > at org.springframework.shell.core.JLineShell.run(JLineShell.java:179) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.IllegalArgumentException: The > 'rya.indexing.pcj.storageType' property must have one of the following > values: [ACCUMULO] > at > com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) > at > org.apache.rya.indexing.external.PrecomputedJoinStorageSupplier.get(PrecomputedJoinStorageSupplier.java:68) > at > org.apache.rya.indexing.external.PrecomputedJoinIndexer.init(PrecomputedJoinIndexer.java:139) > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:156) > ... 16 more > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-298) Implement rdfs:domain inference
[ https://issues.apache.org/jira/browse/RYA-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126458#comment-16126458 ] ASF GitHub Bot commented on RYA-298: Github user jessehatfield commented on the issue: https://github.com/apache/incubator-rya/pull/197 Updated. At some point it would be nice to make a pass over the inference engine for thread-safety across both the old and new logic, maybe once the currently-pending extensions are added. > Implement rdfs:domain inference > --- > > Key: RYA-298 > URL: https://issues.apache.org/jira/browse/RYA-298 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Jesse Hatfield > > If a predicate has an *{{rdfs:domain}}* of some class, than the subject of > any triple including that predicate belongs to the class. > If the ontology states that {{:advisor}} has the domain of {{:Person}}, then > the inference engine should rewrite queries of the form {{?x rdf:type > :Person}} to check for resources which have any {{:advisor}} (as well as any > specifically stated to have type {{:Person}} ). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-298) Implement rdfs:domain inference
[ https://issues.apache.org/jira/browse/RYA-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126469#comment-16126469 ] ASF GitHub Bot commented on RYA-298: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/197 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/389/ > Implement rdfs:domain inference > --- > > Key: RYA-298 > URL: https://issues.apache.org/jira/browse/RYA-298 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Jesse Hatfield > > If a predicate has an *{{rdfs:domain}}* of some class, than the subject of > any triple including that predicate belongs to the class. > If the ontology states that {{:advisor}} has the domain of {{:Person}}, then > the inference engine should rewrite queries of the form {{?x rdf:type > :Person}} to check for resources which have any {{:advisor}} (as well as any > specifically stated to have type {{:Person}} ). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-295) Implement owl:allValuesFrom inference
[ https://issues.apache.org/jira/browse/RYA-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126460#comment-16126460 ] ASF GitHub Bot commented on RYA-295: Github user jessehatfield commented on the issue: https://github.com/apache/incubator-rya/pull/201 Fixed a typo in a log message and a redundant line in the example; updated with latest changes to master. > Implement owl:allValuesFrom inference > - > > Key: RYA-295 > URL: https://issues.apache.org/jira/browse/RYA-295 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Jesse Hatfield > > An *{{owl:allValuesFrom}}* restriction defines the set of resources for > which, given a particular predicate and other type, every value of that > predicate is a member of that type. Note that there may be no values at all. > For example, the ontology may state that resources of type {{:Person}} have > all values from {{:Person}} for type {{:parent}}: that is, a person's parents > are all people as well. Therefore, a pattern of the form {{?x rdf:type > :Person}} should be expanded to: > {noformat} > { ?y rdf:type :Person . > ?y :parent ?x } > UNION > { ?x rdf:type :Person } > {noformat} > i.e. we can infer {{?x}}'s personhood from the fact that child {{?y}} is > known to satisfy the restriction. > Notes: > -We can infer "x is a person, therefore all of x's parents are people". But > we can't infer "all of x's parents are people, therefore x is a person", > because of the open world semantics: we don't know that the parents given by > the data are in fact all of x's parents. (If there were also a cardinality > restriction and we could presume consistency, then we could infer this in the > right circumstances, but this is outside the scope of basic allValuesFrom > support.) This differs with most other property restriction rules in that we > can't infer that an object belongs to the class defined by the restriction, > but rather use the fact that an object is already known to belong in that > class in order to infer something about its neighbors in the graph (the types > of the values). > -The example above could be applied recursively, but to implement this as a > simple query rewrite we'll need to limit recursion depth (and interactions > with other rules, for the same reasons). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-295) Implement owl:allValuesFrom inference
[ https://issues.apache.org/jira/browse/RYA-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126480#comment-16126480 ] ASF GitHub Bot commented on RYA-295: Github user asfgit commented on the issue: https://github.com/apache/incubator-rya/pull/201 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/390/Failed Tests: 3incubator-rya-master-with-optionals-pull-requests/org.apache.rya:rya.prospector: 3org.apache.rya.prospector.mr.ProspectorTest.testCountorg.apache.rya.prospector.service.ProspectorServiceEvalStatsDAOTest.testCountorg.apache.rya.prospector.service.ProspectorServiceEvalStatsDAOTest.testNoAuthsCount > Implement owl:allValuesFrom inference > - > > Key: RYA-295 > URL: https://issues.apache.org/jira/browse/RYA-295 > Project: Rya > Issue Type: Sub-task > Components: sail >Reporter: Jesse Hatfield >Assignee: Jesse Hatfield > > An *{{owl:allValuesFrom}}* restriction defines the set of resources for > which, given a particular predicate and other type, every value of that > predicate is a member of that type. Note that there may be no values at all. > For example, the ontology may state that resources of type {{:Person}} have > all values from {{:Person}} for type {{:parent}}: that is, a person's parents > are all people as well. Therefore, a pattern of the form {{?x rdf:type > :Person}} should be expanded to: > {noformat} > { ?y rdf:type :Person . > ?y :parent ?x } > UNION > { ?x rdf:type :Person } > {noformat} > i.e. we can infer {{?x}}'s personhood from the fact that child {{?y}} is > known to satisfy the restriction. > Notes: > -We can infer "x is a person, therefore all of x's parents are people". But > we can't infer "all of x's parents are people, therefore x is a person", > because of the open world semantics: we don't know that the parents given by > the data are in fact all of x's parents. (If there were also a cardinality > restriction and we could presume consistency, then we could infer this in the > right circumstances, but this is outside the scope of basic allValues>From > support.) This differs with most other property restriction rules in that we > can't infer that an object belongs to the class defined by the restriction, > but rather use the fact that an object is already known to belong in that > class in order to infer something about its neighbors in the graph (the types > of the values). > -The example above could be applied recursively, but to implement this as a > simple query rewrite we'll need to limit recursion depth (and interactions > with other rules, for the same reasons). -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (RYA-343) AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table.
[ https://issues.apache.org/jira/browse/RYA-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126702#comment-16126702 ] ASF GitHub Bot commented on RYA-343: Github user meiercaleb commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/205#discussion_r133100980 --- Diff: common/rya.api/src/main/java/org/apache/rya/api/instance/RyaDetailsToConfiguration.java --- @@ -53,14 +53,16 @@ public static void addRyaDetailsToConfiguration(final RyaDetails details, final checkAndSet(conf, ConfigurationFields.USE_FREETEXT, details.getFreeTextIndexDetails().isEnabled()); //RYA-215checkAndSet(conf, ConfigurationFields.USE_GEO, details.getGeoIndexDetails().isEnabled()); checkAndSet(conf, ConfigurationFields.USE_TEMPORAL, details.getTemporalIndexDetails().isEnabled()); -PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); - if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); - conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); - conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); - } else { - checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, false); - } +final PCJIndexDetails pcjDetails = details.getPCJIndexDetails(); +if (pcjDetails.isEnabled() && pcjDetails.getFluoDetails().isPresent()) { +checkAndSet(conf, ConfigurationFields.USE_PCJ_UPDATER, true); +conf.set(ConfigurationFields.FLUO_APP_NAME, pcjDetails.getFluoDetails().get().getUpdateAppName()); +conf.set(ConfigurationFields.PCJ_UPDATER_TYPE, "FLUO"); +conf.set(ConfigurationFields.PCJ_STORAGE_TYPE, "ACCUMULO"); --- End diff -- So this is probably okay for now. But this method could take in either an instance of AccumuloRyaInstanceDetails or an instance of MongoRyaInstanceDetails. So the storage type could be Accumulo or Mongo (note that the Mongo storage type doesn't currently exist in master, but will be merged in as part of a pull request). Given that there is currently no updater for mongo, there will be no fluo details so the the Accumulo storage type will never be set for a Mongo backed instance. But this could change once an updater is implemented for Mongo. The best thing to do is to add a getStorageType() method to the RyaInstanceDetails, and then just pass this into the config so that the storage type aligns with the RyaInstanceDetails type. > AccumuloLoadStatementsFile fails when loading data to a PCJ-enabled table. > -- > > Key: RYA-343 > URL: https://issues.apache.org/jira/browse/RYA-343 > Project: Rya > Issue Type: Sub-task > Components: clients >Reporter: Jeff Dasch >Assignee: Jeff Dasch > > Issue occurs when calling {{AccumuloLoadStatementsFile.loadStatements()}} to > loading data to a PCJ-enabled table. I believe this is a recent regression. > {noformat} > 2017-08-14 13:46:51,802 [Spring Shell] WARN > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile - Exception > while loading: > org.apache.rya.api.persist.RyaDAOException: > java.lang.IllegalArgumentException: The 'rya.indexing.pcj.storageType' > property must have one of the following values: [ACCUMULO] > at org.apache.rya.accumulo.AccumuloRyaDAO.init(AccumuloRyaDAO.java:165) > at > org.apache.rya.sail.config.RyaSailFactory.getAccumuloDAO(RyaSailFactory.java:155) > at > org.apache.rya.sail.config.RyaSailFactory.getRyaSail(RyaSailFactory.java:100) > at > org.apache.rya.sail.config.RyaSailFactory.getInstance(RyaSailFactory.java:67) > at > org.apache.rya.api.client.accumulo.AccumuloLoadStatementsFile.loadStatements(AccumuloLoadStatementsFile.java:91) > at org.apache.rya.shell.RyaCommands.loadData(RyaCommands.java:121) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:210) > at > org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:64) > at > org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:57) > at >