[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672334#comment-15672334 ] Denis Magda commented on IGNITE-4238: - Added the example to "lgpl" section of the project. Here is the pull-request: https://github.com/apache/ignite/pull/1241 [~avinogradov], please review that everything is properly done at Maven pom.xml layer. There is a chance that I missed something that is related to the fact that a binary version of {{ignite-spatial}} is not located in Maven Central and I have to add the GG remote repo URL to the pom if someone decides to run the example after downloading Apache Ignite binary and opening examples project. [~sergi.vladykin], looks like that geospatial module is broken in the master. The example that I'm willing to merge works perfectly fine for version 1.7 and earliest but fails in the master with the exception below. Please have a look at the issue. This is the link to the same example that runs successfully on version 1.7 (https://github.com/apache/ignite/pull/1241/files). {code} [17:19:29,635][ERROR][main][GridMapQueryExecutor] Failed to execute local query. class org.apache.ignite.IgniteCheckedException: Failed to execute SQL query. at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQuery(IgniteH2Indexing.java:929) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:981) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.executeSqlQueryWithTimer(IgniteH2Indexing.java:956) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:567) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:449) at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:203) at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:167) at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor$1.applyx(GridReduceQueryExecutor.java:165) at org.apache.ignite.internal.util.lang.IgniteInClosure2X.apply(IgniteInClosure2X.java:38) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.send(IgniteH2Indexing.java:1836) at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.send(GridReduceQueryExecutor.java:1184) at org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:614) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1089) at org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81) at org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$6.iterator(IgniteH2Indexing.java:1127) at org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81) at org.apache.ignite.internal.processors.cache.QueryCursorImpl.getAll(QueryCursorImpl.java:100) at org.apache.ignite.examples.datagrid.SpatialQueryExample.main(SpatialQueryExample.java:65) 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: org.h2.jdbc.JdbcSQLException: General error: "com.vividsolutions.jts.io.ParseException: Unknown geometry type: com.vividsolutions.jts.geom.Polygon (line 1)"; SQL statement: SELECT "SpatialQueryExample".MAPPOINT._KEY __C0, "SpatialQueryExample".MAPPOINT._VAL __C1 FROM "SpatialQueryExample".MAPPOINT WHERE INTERSECTS(COORDS, ?1) [5-191] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.value.ValueGeometry.get(ValueGeometry.java:105) at org.h2.value.Value.convertTo(Value.java:948) at org.apache.ignite.internal.processors.query.h2.opt.GridH2SpatialIndex.getEnvelope(GridH2SpatialIndex.java:175) at org.apache.ignite.internal.processors.query.h2.opt.GridH2SpatialIndex.findByGeometry(GridH2SpatialIndex.java:337) at org.h2.index.IndexCursor.find(IndexCursor.java:166) at org.h2.table.TableFilter.next(TableFilter.java:460) at org.h2.command.dml.Select.queryFlat(Select.java:
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15673277#comment-15673277 ] Anton Vinogradov commented on IGNITE-4238: -- [~dmagda], 1) Seems you forgot to update pom-standalone-lgpl.xml As far as I can see it already contains dependencies on ignite-hibernate and ignite-schedule. 2) It's impossible to add GG or any other remote repo URL to Ignite examples sources, except original one. Also, it's impossible to run lgpl examples from binaries, not least because Apache does not provide lgpl examples as a part of binaries :) The only way to run lgpl examples is to run them from sources. In this case you'll have no problems to have lgpl artifacts inslalled at your local mvn repo. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task >Reporter: Denis Magda >Assignee: Sergi Vladykin >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15674028#comment-15674028 ] Denis Magda commented on IGNITE-4238: - [~avinogradov], thanks for the review. Modified poms according to your comments and pushed the changes to the master. [~amashenkov], please investigate the reason of the issue above. You can run the example ({{SpatialQueryExample}}) from the master as is or one of the tests created for the example - {{SpatialQueryExampleSelfTest}}, {{SpatialQueryExampleMultiNodeSelfTest}} > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task >Reporter: Denis Magda >Assignee: Andrew Mashenkov >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15676437#comment-15676437 ] Andrew Mashenkov commented on IGNITE-4238: -- When you call "cache.query(qry)", query is converted to binary with it's arguments by IgniteCacheProxy before sending query to QueryProcessor. QueryProcessor deserialize query but not parameters. So, binding paramenters are BinaryObjectImpl instances, that causes incorrect type interpretation. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task >Reporter: Denis Magda >Assignee: Andrew Mashenkov >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15676466#comment-15676466 ] ASF GitHub Bot commented on IGNITE-4238: GitHub user AMashenkov opened a pull request: https://github.com/apache/ignite/pull/1248 IGNITE-4238: example spatial queries fails Fixed: deserialize binary sql arguments before binding You can merge this pull request into a Git repository by running: $ git pull https://github.com/gridgain/apache-ignite ignite-4238 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/1248.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 #1248 commit 16f0f7a27488722239f07f571c882aa3facd69c2 Author: Andrey V. Mashenkov Date: 2016-11-18T10:55:21Z Fixed: deserialize binary sql arguments before binding > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task >Reporter: Denis Magda >Assignee: Andrew Mashenkov >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15686315#comment-15686315 ] Roman Shtykh commented on IGNITE-4238: -- Denis, Do the three new files need ASF headers? > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Denis Magda >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15686326#comment-15686326 ] ASF GitHub Bot commented on IGNITE-4238: Github user AMashenkov closed the pull request at: https://github.com/apache/ignite/pull/1248 > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Denis Magda >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15686563#comment-15686563 ] Vladimir Ozerov commented on IGNITE-4238: - Guys, Problem with geo indexes is fixed. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Denis Magda >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687076#comment-15687076 ] Denis Magda commented on IGNITE-4238: - [~vozerov], the example has been already merged but still fails because the fix from IGNITE-4259 is not in the master. Please merged the fix and validate it against the example. To validate the example: - run the example {{SpatialQueryExample}} from the master; - run the tests that were added deliberately for it {{SpatialQueryExampleSelfTest, SpatialQueryExampleMultiNodeSelfTest}} If the validation of the example succeeds then close this ticket. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Denis Magda >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687080#comment-15687080 ] Denis Magda commented on IGNITE-4238: - Roman, good catch, thanks! Added the header. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Vladimir Ozerov >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (IGNITE-4238) Example for spatial queries
[ https://issues.apache.org/jira/browse/IGNITE-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15689360#comment-15689360 ] Vladimir Ozerov commented on IGNITE-4238: - Merged, tests. Everything went exceptionally well :-) Closing. > Example for spatial queries > --- > > Key: IGNITE-4238 > URL: https://issues.apache.org/jira/browse/IGNITE-4238 > Project: Ignite > Issue Type: Task > Components: SQL >Affects Versions: 1.7 >Reporter: Denis Magda >Assignee: Vladimir Ozerov >Priority: Blocker > Fix For: 1.8 > > > The geospatial example is missing in Apache examples. It makes sense to add > it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)