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 2015/12/16 11:12:02 UTC

[1/2] ignite git commit: IGNITE-2100: Warnings.

Repository: ignite
Updated Branches:
  refs/heads/ignite-2100 3e6fbb1ed -> 55a60514e


IGNITE-2100: Warnings.


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

Branch: refs/heads/ignite-2100
Commit: 75e5f3c3c1b42cf254e9ebbfa7d16de0d91529ae
Parents: 3e6fbb1
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Dec 16 13:11:56 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Dec 16 13:11:56 2015 +0300

----------------------------------------------------------------------
 .../internal/binary/BinaryClassDescriptor.java  |  8 +--
 .../processors/query/GridQueryProcessor.java    | 62 ++++++++++----------
 2 files changed, 36 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/75e5f3c3/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 345cf2d..9169ad4 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
@@ -177,10 +177,10 @@ public class BinaryClassDescriptor {
         }
 
         if (useOptMarshaller) {
-            U.warn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be written in binary format because it " +
-                "either implements Externalizable interface or have writeObject/readObject methods. Please ensure " +
-                "that all nodes have this class in classpath. To enable binary serialization either implement " +
-                Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
+            U.quietAndWarn(ctx.log(), "Class \"" + cls.getName() + "\" cannot be written in binary format because " +
+                "it either implements Externalizable interface or have writeObject/readObject methods. Please " +
+                "ensure that all nodes have this class in classpath. To enable binary serialization either " +
+                "implement " + Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
                 "BinaryTypeConfiguration.setSerializer() method." );
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/75e5f3c3/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index b75f473..72f5107 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -198,7 +198,7 @@ public class GridQueryProcessor extends GridProcessorAdapter {
         idx.registerCache(ccfg);
 
         try {
-            List<Class<?>> extClasses = null;
+            List<Class<?>> mustDeserializeClss = null;
 
             boolean binaryEnabled = ctx.cacheObjects().isBinaryEnabled(ccfg);
 
@@ -217,16 +217,16 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                     Class<?> valCls = U.classForName(qryEntity.getValueType(), null);
 
                     // If local node has the classes and they are externalizable, we must use reflection properties.
-                    boolean binaryKeyAsOptimized = mustDeserializeBinary(keyCls);
-                    boolean binaryValAsOptimized = mustDeserializeBinary(valCls);
+                    boolean keyMustDeserialize = mustDeserializeBinary(keyCls);
+                    boolean valMustDeserialize = mustDeserializeBinary(valCls);
 
-                    boolean binaryKeyOrValAsOptimized = binaryKeyAsOptimized || binaryValAsOptimized;
+                    boolean keyOrValMustDeserialize = keyMustDeserialize || valMustDeserialize;
 
                     String simpleValType = valCls == null ? typeName(qryEntity.getValueType()) : typeName(valCls);
 
                     desc.name(simpleValType);
 
-                    if (binaryEnabled && !binaryKeyOrValAsOptimized) {
+                    if (binaryEnabled && !keyOrValMustDeserialize) {
                         // Safe to check null.
                         if (SQL_TYPES.contains(valCls))
                             desc.valueClass(valCls);
@@ -251,21 +251,21 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         desc.keyClass(keyCls);
                     }
 
-                    if (binaryEnabled && binaryKeyOrValAsOptimized) {
-                        if (extClasses == null)
-                            extClasses = new ArrayList<>();
+                    if (binaryEnabled && keyOrValMustDeserialize) {
+                        if (mustDeserializeClss == null)
+                            mustDeserializeClss = new ArrayList<>();
 
-                        if (binaryKeyAsOptimized)
-                            extClasses.add(keyCls);
+                        if (keyMustDeserialize)
+                            mustDeserializeClss.add(keyCls);
 
-                        if (binaryValAsOptimized)
-                            extClasses.add(valCls);
+                        if (valMustDeserialize)
+                            mustDeserializeClss.add(valCls);
                     }
 
                     TypeId typeId;
                     TypeId altTypeId = null;
 
-                    if (valCls == null || (binaryEnabled && !binaryKeyOrValAsOptimized)) {
+                    if (valCls == null || (binaryEnabled && !keyOrValMustDeserialize)) {
                         processBinaryMeta(qryEntity, desc);
 
                         typeId = new TypeId(ccfg.getName(), ctx.cacheObjects().typeId(qryEntity.getValueType()));
@@ -308,14 +308,14 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                     Class<?> valCls = U.classForName(meta.getValueType(), null);
 
                     // If local node has the classes and they are externalizable, we must use reflection properties.
-                    boolean binaryKeyAsOptimized = mustDeserializeBinary(keyCls);
-                    boolean binaryValAsOptimized= mustDeserializeBinary(valCls);
+                    boolean keyMustDeserialize = mustDeserializeBinary(keyCls);
+                    boolean valMustDeserialize = mustDeserializeBinary(valCls);
 
-                    boolean binaryKeyOrValAsOptimized = binaryKeyAsOptimized || binaryValAsOptimized;
+                    boolean keyOrValMustDeserialize = keyMustDeserialize || valMustDeserialize;
 
                     desc.name(meta.getSimpleValueType());
 
-                    if (binaryEnabled && !binaryKeyOrValAsOptimized) {
+                    if (binaryEnabled && !keyOrValMustDeserialize) {
                         // Safe to check null.
                         if (SQL_TYPES.contains(valCls))
                             desc.valueClass(valCls);
@@ -332,21 +332,21 @@ public class GridQueryProcessor extends GridProcessorAdapter {
                         desc.keyClass(keyCls);
                     }
 
-                    if (binaryEnabled && binaryKeyOrValAsOptimized) {
-                        if (extClasses == null)
-                            extClasses = new ArrayList<>();
+                    if (binaryEnabled && keyOrValMustDeserialize) {
+                        if (mustDeserializeClss == null)
+                            mustDeserializeClss = new ArrayList<>();
 
-                        if (binaryKeyAsOptimized)
-                            extClasses.add(keyCls);
+                        if (keyMustDeserialize)
+                            mustDeserializeClss.add(keyCls);
 
-                        if (binaryValAsOptimized)
-                            extClasses.add(valCls);
+                        if (valMustDeserialize)
+                            mustDeserializeClss.add(valCls);
                     }
 
                     TypeId typeId;
                     TypeId altTypeId = null;
 
-                    if (valCls == null || (binaryEnabled && !binaryKeyOrValAsOptimized)) {
+                    if (valCls == null || (binaryEnabled && !keyOrValMustDeserialize)) {
                         processBinaryMeta(meta, desc);
 
                         typeId = new TypeId(ccfg.getName(), ctx.cacheObjects().typeId(meta.getValueType()));
@@ -373,11 +373,13 @@ public class GridQueryProcessor extends GridProcessorAdapter {
 
             // Indexed types must be translated to CacheTypeMetadata in CacheConfiguration.
 
-            if (extClasses != null) {
-                U.quietAndWarn(log, "Externalizable classes are specified in query configuration while " +
-                    "BinaryMarshaller is used. Values of the following types will be deserialized in order to build " +
-                    "indexes (use Serializable or " + Binarylizable.class.getSimpleName() +" implementation to " +
-                    "allow fields extraction without deserialization): " + extClasses);
+            if (mustDeserializeClss != null) {
+                U.quietAndWarn(log, "Some classes in query configuration cannot be written in binary format " +
+                    "because they either implement Externalizable interface or have writeObject/readObject methods. " +
+                    "Their instances will be deserialized in order to build indexes. Please ensure that all nodes " +
+                    "have this class in classpath. To enable binary serialization either implement " +
+                    Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
+                    "BinaryTypeConfiguration.setSerializer() method: " + mustDeserializeClss);
             }
         }
         catch (IgniteCheckedException | RuntimeException e) {


[2/2] ignite git commit: IGNITE-2100: Warnings.

Posted by vo...@apache.org.
IGNITE-2100: Warnings.


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

Branch: refs/heads/ignite-2100
Commit: 55a60514ed17c81b99dd7800f814eac315d2b096
Parents: 75e5f3c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Wed Dec 16 13:12:34 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Wed Dec 16 13:12:34 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/query/GridQueryProcessor.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/55a60514/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
index 72f5107..0eb49eb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
@@ -376,8 +376,8 @@ public class GridQueryProcessor extends GridProcessorAdapter {
             if (mustDeserializeClss != null) {
                 U.quietAndWarn(log, "Some classes in query configuration cannot be written in binary format " +
                     "because they either implement Externalizable interface or have writeObject/readObject methods. " +
-                    "Their instances will be deserialized in order to build indexes. Please ensure that all nodes " +
-                    "have this class in classpath. To enable binary serialization either implement " +
+                    "Instances of these classes will be deserialized in order to build indexes. Please ensure that " +
+                    "all nodes have these classes in classpath. To enable binary serialization either implement " +
                     Binarylizable.class.getSimpleName() + " interface or set explicit serializer using " +
                     "BinaryTypeConfiguration.setSerializer() method: " + mustDeserializeClss);
             }