You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/11/22 11:48:36 UTC

[1/4] ignite git commit: Fix.

Repository: ignite
Updated Branches:
  refs/heads/ignite-4259-1 [created] e311c8678


Fix.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c8c62d67
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c8c62d67
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c8c62d67

Branch: refs/heads/ignite-4259-1
Commit: c8c62d670d818e8022efd980a320cd2255c243cb
Parents: ba99df1
Author: devozerov <vo...@gridgain.com>
Authored: Tue Nov 22 14:02:47 2016 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Nov 22 14:02:47 2016 +0300

----------------------------------------------------------------------
 .../ignite/internal/binary/BinaryContext.java   |  4 ++
 .../h2/GridBinaryH2IndexingGeoSelfTest.java     | 58 ++++++++++++++++++++
 .../testsuites/GeoSpatialIndexingTestSuite.java |  2 +
 3 files changed, 64 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c8c62d67/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index a1ea3e9..7e7afa5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -78,6 +78,7 @@ import org.apache.ignite.internal.processors.igfs.meta.IgfsMetaUpdateTimesProces
 import org.apache.ignite.internal.processors.platform.PlatformJavaObjectFactoryProxy;
 import org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionData;
 import org.apache.ignite.internal.processors.platform.websession.PlatformDotNetSessionLockResult;
+import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.util.lang.GridMapEntry;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.T2;
@@ -351,6 +352,9 @@ public class BinaryContext {
      */
     @SuppressWarnings("SimplifiableIfStatement")
     public boolean mustDeserialize(Class cls) {
+        if (GridQueryProcessor.isGeometryClass(cls))
+            return true;
+
         BinaryClassDescriptor desc = descByCls.get(cls);
 
         if (desc == null) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c8c62d67/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
new file mode 100644
index 0000000..c2fc260
--- /dev/null
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.ignite.internal.processors.query.h2;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.io.WKTReader;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.testframework.GridTestUtils;
+
+import javax.cache.Cache;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Geo-indexing test for binary mode.
+ */
+public class GridBinaryH2IndexingGeoSelfTest extends GridH2IndexingGeoSelfTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.setMarshaller(new BinaryMarshaller());
+
+        return cfg;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c8c62d67/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java
index d3b8d01..1773894 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/testsuites/GeoSpatialIndexingTestSuite.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.internal.processors.query.h2.GridBinaryH2IndexingGeoSelfTest;
 import org.apache.ignite.internal.processors.query.h2.GridH2IndexingGeoSelfTest;
 
 /**
@@ -33,6 +34,7 @@ public class GeoSpatialIndexingTestSuite extends TestSuite {
 
         // Geo.
         suite.addTestSuite(GridH2IndexingGeoSelfTest.class);
+        suite.addTestSuite(GridBinaryH2IndexingGeoSelfTest.class);
 
         return suite;
     }


[3/4] ignite git commit: Fix.

Posted by vo...@apache.org.
Fix.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/25356369
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/25356369
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/25356369

Branch: refs/heads/ignite-4259-1
Commit: 2535636961f623c9e1434b99b735c4965db67981
Parents: a171f97
Author: devozerov <vo...@gridgain.com>
Authored: Tue Nov 22 14:13:59 2016 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Nov 22 14:13:59 2016 +0300

----------------------------------------------------------------------
 .../h2/GridBinaryH2IndexingGeoSelfTest.java     | 23 --------------------
 .../query/h2/GridH2IndexingGeoSelfTest.java     |  2 +-
 2 files changed, 1 insertion(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/25356369/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
index c2fc260..01071f9 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridBinaryH2IndexingGeoSelfTest.java
@@ -17,31 +17,8 @@
 
 package org.apache.ignite.internal.processors.query.h2;
 
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.io.WKTReader;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.query.SqlFieldsQuery;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import javax.cache.Cache;
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * Geo-indexing test for binary mode.

http://git-wip-us.apache.org/repos/asf/ignite/blob/25356369/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
index b73a5c0..2843076 100644
--- a/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
+++ b/modules/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexingGeoSelfTest.java
@@ -41,7 +41,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
 /**
- *
+ * Geo-indexing test.
  */
 public class GridH2IndexingGeoSelfTest extends GridCacheAbstractSelfTest {
     /** */


[4/4] ignite git commit: Fixed warning printout.

Posted by vo...@apache.org.
Fixed warning printout.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e311c867
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e311c867
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e311c867

Branch: refs/heads/ignite-4259-1
Commit: e311c867849e9c5bf245a248b3c423da223c7e00
Parents: 2535636
Author: devozerov <vo...@gridgain.com>
Authored: Tue Nov 22 14:38:13 2016 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Nov 22 14:38:13 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/binary/BinaryClassDescriptor.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e311c867/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
index 813237a..b121337 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
@@ -190,7 +190,8 @@ public class BinaryClassDescriptor {
                 mode = serializer != null ? BinaryWriteMode.BINARY : BinaryUtils.mode(cls);
         }
 
-        if (useOptMarshaller && userType && !U.isIgnite(cls) && !U.isJdk(cls)) {
+        if (useOptMarshaller && userType && !U.isIgnite(cls) && !U.isJdk(cls) &&
+            !GridQueryProcessor.isGeometryClass(cls)) {
             U.warn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be serialized using " +
                 BinaryMarshaller.class.getSimpleName() + " because it either implements Externalizable interface " +
                 "or have writeObject/readObject methods. " + OptimizedMarshaller.class.getSimpleName() + " will be " +


[2/4] ignite git commit: Fix.

Posted by vo...@apache.org.
Fix.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a171f976
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a171f976
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a171f976

Branch: refs/heads/ignite-4259-1
Commit: a171f9766336ba38853acd2be272d0b4b8e40305
Parents: c8c62d6
Author: devozerov <vo...@gridgain.com>
Authored: Tue Nov 22 14:13:17 2016 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Nov 22 14:13:17 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/binary/BinaryClassDescriptor.java   | 3 ++-
 .../java/org/apache/ignite/internal/binary/BinaryContext.java  | 6 ++----
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a171f976/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
index d05ce71..813237a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
@@ -41,6 +41,7 @@ import org.apache.ignite.binary.BinaryReflectiveSerializer;
 import org.apache.ignite.binary.BinarySerializer;
 import org.apache.ignite.binary.Binarylizable;
 import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
+import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.util.GridUnsafe;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
@@ -156,7 +157,7 @@ public class BinaryClassDescriptor {
         initialSerializer = serializer;
 
         // If serializer is not defined at this point, then we have to use OptimizedMarshaller.
-        useOptMarshaller = serializer == null;
+        useOptMarshaller = serializer == null || GridQueryProcessor.isGeometryClass(cls);
 
         // Reset reflective serializer so that we rely on existing reflection-based serialization.
         if (serializer instanceof BinaryReflectiveSerializer)

http://git-wip-us.apache.org/repos/asf/ignite/blob/a171f976/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
index 7e7afa5..cc18318 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryContext.java
@@ -352,16 +352,14 @@ public class BinaryContext {
      */
     @SuppressWarnings("SimplifiableIfStatement")
     public boolean mustDeserialize(Class cls) {
-        if (GridQueryProcessor.isGeometryClass(cls))
-            return true;
-
         BinaryClassDescriptor desc = descByCls.get(cls);
 
         if (desc == null) {
             if (BinaryUtils.wrapTrees() && (cls == TreeMap.class || cls == TreeSet.class))
                 return false;
 
-            return marshCtx.isSystemType(cls.getName()) || serializerForClass(cls) == null;
+            return marshCtx.isSystemType(cls.getName()) || serializerForClass(cls) == null ||
+                GridQueryProcessor.isGeometryClass(cls);
         }
         else
             return desc.useOptimizedMarshaller();