You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/22 10:38:32 UTC

[1/9] ignite git commit: ignite-1.5 Added CacheConfiguration.storeKeepBinary flag support in Visor.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 820a13afa -> 0fd1e158e


ignite-1.5 Added CacheConfiguration.storeKeepBinary flag support in Visor.


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

Branch: refs/heads/ignite-1537
Commit: c5ed0d0e23329b8badb594e6f625eb58a24e2392
Parents: d8576b8
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Tue Dec 22 14:14:43 2015 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Dec 22 14:14:43 2015 +0700

----------------------------------------------------------------------
 .../visor/cache/VisorCacheStoreConfiguration.java      | 13 ++++++++++++-
 .../visor/commands/cache/VisorCacheCommand.scala       |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c5ed0d0e/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
index f2d5961..38a419a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
@@ -65,6 +65,9 @@ public class VisorCacheStoreConfiguration implements Serializable {
     /** Number of threads that will perform cache flushing. */
     private int flushThreadCnt;
 
+    /** Keep binary in store flag. */
+    private boolean storeKeepBinary;
+
     /**
      * @param ignite Ignite instance.
      * @param ccfg Cache configuration.
@@ -81,6 +84,7 @@ public class VisorCacheStoreConfiguration implements Serializable {
 
         cfg.store = compactClass(store);
         cfg.storeFactory = compactClass(ccfg.getCacheStoreFactory());
+        cfg.storeKeepBinary = ccfg.isStoreKeepBinary();
 
         cfg.readThrough = ccfg.isReadThrough();
         cfg.writeThrough = ccfg.isWriteThrough();
@@ -123,6 +127,13 @@ public class VisorCacheStoreConfiguration implements Serializable {
     }
 
     /**
+     * @return Keep binary in store flag.
+     */
+    public boolean storeKeepBinary() {
+        return storeKeepBinary;
+    }
+
+    /**
      * @return Whether cache should operate in read-through mode.
      */
     public boolean readThrough() {
@@ -175,4 +186,4 @@ public class VisorCacheStoreConfiguration implements Serializable {
     @Override public String toString() {
         return S.toString(VisorCacheStoreConfiguration.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c5ed0d0e/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index 0d8d036..57f7066 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -866,6 +866,7 @@ object VisorCacheCommand {
         cacheT += ("Store Enabled", bool2Str(storeCfg.enabled()))
         cacheT += ("Store Class", safe(storeCfg.store()))
         cacheT += ("Store Factory Class", storeCfg.storeFactory())
+        cacheT += ("Store Keep Binary", storeCfg.storeKeepBinary())
         cacheT += ("Store Read Through", bool2Str(storeCfg.readThrough()))
         cacheT += ("Store Write Through", bool2Str(storeCfg.writeThrough()))
 


[3/9] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5


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

Branch: refs/heads/ignite-1537
Commit: 6a91996e328ad29dde03b68622517360cb7a7ffb
Parents: 8c2b674 c5ed0d0
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 22 10:17:06 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 22 10:17:06 2015 +0300

----------------------------------------------------------------------
 .../visor/cache/VisorCacheStoreConfiguration.java      | 13 ++++++++++++-
 .../visor/commands/cache/VisorCacheCommand.scala       |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[6/9] ignite git commit: Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5

Posted by sb...@apache.org.
Merge remote-tracking branch 'origin/ignite-1.5' into ignite-1.5


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

Branch: refs/heads/ignite-1537
Commit: bbdb20248f606f4b5e9da709d54027a7158b6ea3
Parents: 627134b 3aa6f82
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Dec 22 11:29:06 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Dec 22 11:29:06 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/IgniteCacheProxy.java    |  3 +--
 .../visor/cache/VisorCacheStoreConfiguration.java      | 13 ++++++++++++-
 .../visor/commands/cache/VisorCacheCommand.scala       |  1 +
 .../yardstick/config/benchmark-multicast.properties    |  2 +-
 4 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------



[8/9] ignite git commit: ignite-1.5 Fixed hang on metadata update inside put in atomic cache when topology read lock is held.

Posted by sb...@apache.org.
ignite-1.5 Fixed hang on metadata update inside put in atomic cache when topology read lock is held.


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

Branch: refs/heads/ignite-1537
Commit: 3fed8be0a089a194dafa6bbe4279cacfb04472e7
Parents: 820a13a
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 22 12:35:09 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 22 12:35:09 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3fed8be0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index 7f256bb..9aa6fa6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -605,6 +605,7 @@ public class GridNearAtomicUpdateFuture extends GridFutureAdapter<Object>
          * @param res Response.
          * @param nodeErr {@code True} if response was created on node failure.
          */
+        @SuppressWarnings("unchecked")
         void onResult(UUID nodeId, GridNearAtomicUpdateResponse res, boolean nodeErr) {
             GridNearAtomicUpdateRequest req;
 


[9/9] ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1.5' into ignite-1537


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

Branch: refs/heads/ignite-1537
Commit: 0fd1e158e68154adebadaa1e22707bad563290ef
Parents: 3fed8be 3ee0966
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 22 12:36:21 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 22 12:36:21 2015 +0300

----------------------------------------------------------------------
 .../internal/binary/BinaryClassDescriptor.java  |  56 +++++--
 .../ignite/internal/binary/BinaryUtils.java     |  11 ++
 .../processors/cache/IgniteCacheProxy.java      |   3 +-
 .../cache/VisorCacheStoreConfiguration.java     |  13 +-
 .../binary/BinaryMarshallerSelfTest.java        | 110 ++++++++++++++
 ...teCacheFullTextQueryNodeJoiningSelfTest.java | 145 +++++++++++++++++++
 .../IgniteBinaryCacheQueryTestSuite.java        |   3 +-
 .../commands/cache/VisorCacheCommand.scala      |   1 +
 .../config/benchmark-multicast.properties       |   2 +-
 9 files changed, 329 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0fd1e158/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------


[5/9] ignite git commit: IGNITE-2213: Fixed serialization of duplicate fields.

Posted by sb...@apache.org.
IGNITE-2213: Fixed serialization of duplicate fields.


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

Branch: refs/heads/ignite-1537
Commit: 627134b25ca730d7a7dbcec9facde158c5d15dc3
Parents: d8576b8
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Tue Dec 22 11:28:44 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Tue Dec 22 11:28:44 2015 +0300

----------------------------------------------------------------------
 .../internal/binary/BinaryClassDescriptor.java  |  56 ++++++++--
 .../ignite/internal/binary/BinaryUtils.java     |  11 ++
 .../binary/BinaryMarshallerSelfTest.java        | 110 +++++++++++++++++++
 .../IgniteBinaryCacheQueryTestSuite.java        |   3 +-
 4 files changed, 169 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/627134b2/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 1eb3882..1105809 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
@@ -35,6 +35,7 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
 import java.sql.Timestamp;
 import java.util.ArrayList;
@@ -44,11 +45,9 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
+import java.util.Set;
 import java.util.UUID;
 
-import static java.lang.reflect.Modifier.isStatic;
-import static java.lang.reflect.Modifier.isTransient;
-
 /**
  * Binary class descriptor.
  */
@@ -250,21 +249,24 @@ public class BinaryClassDescriptor {
 
                 BinarySchema.Builder schemaBuilder = BinarySchema.Builder.newBuilder();
 
+                Set<String> duplicates = duplicateFields(cls);
+
                 Collection<String> names = new HashSet<>();
                 Collection<Integer> ids = new HashSet<>();
 
                 for (Class<?> c = cls; c != null && !c.equals(Object.class); c = c.getSuperclass()) {
                     for (Field f : c.getDeclaredFields()) {
-                        int mod = f.getModifiers();
-
-                        if (!isStatic(mod) && !isTransient(mod)) {
+                        if (serializeField(f)) {
                             f.setAccessible(true);
 
                             String name = f.getName();
 
-                            if (!names.add(name))
-                                throw new BinaryObjectException("Duplicate field name [fieldName=" + name +
-                                    ", cls=" + cls.getName() + ']');
+                            if (duplicates.contains(name))
+                                name = BinaryUtils.qualifiedFieldName(c, name);
+
+                            boolean added = names.add(name);
+
+                            assert added : name;
 
                             int fieldId = idMapper.fieldId(typeId, name);
 
@@ -308,6 +310,42 @@ public class BinaryClassDescriptor {
     }
 
     /**
+     * Find all fields with duplicate names in the class.
+     *
+     * @param cls Class.
+     * @return Fields with duplicate names.
+     */
+    private static Set<String> duplicateFields(Class cls) {
+        Set<String> all = new HashSet<>();
+        Set<String> duplicates = new HashSet<>();
+
+        for (Class<?> c = cls; c != null && !c.equals(Object.class); c = c.getSuperclass()) {
+            for (Field f : c.getDeclaredFields()) {
+                if (serializeField(f)) {
+                    String name = f.getName();
+
+                    if (!all.add(name))
+                        duplicates.add(name);
+                }
+            }
+        }
+
+        return duplicates;
+    }
+
+    /**
+     * Whether the field must be serialized.
+     *
+     * @param f Field.
+     * @return {@code True} if must be serialized.
+     */
+    private static boolean serializeField(Field f) {
+        int mod = f.getModifiers();
+
+        return !Modifier.isStatic(mod) && !Modifier.isTransient(mod);
+    }
+
+    /**
      * @return {@code True} if enum.
      */
     boolean isEnum() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/627134b2/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
index 8cb4b38..62a9d26 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java
@@ -1883,6 +1883,17 @@ public class BinaryUtils {
     }
 
     /**
+     * Create qualified field name.
+     *
+     * @param cls Class.
+     * @param fieldName Field name.
+     * @return Qualified field name.
+     */
+    public static String qualifiedFieldName(Class cls, String fieldName) {
+        return cls.getName() + "." + fieldName;
+    }
+
+    /**
      * Enum type.
      */
     private static class EnumType {

http://git-wip-us.apache.org/repos/asf/ignite/blob/627134b2/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
index fcd511b..ac9771f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java
@@ -54,6 +54,7 @@ import java.util.concurrent.ConcurrentSkipListSet;
 import junit.framework.Assert;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.binary.BinaryCollectionFactory;
+import org.apache.ignite.binary.BinaryField;
 import org.apache.ignite.binary.BinaryIdMapper;
 import org.apache.ignite.binary.BinaryMapFactory;
 import org.apache.ignite.binary.BinaryObject;
@@ -63,6 +64,7 @@ import org.apache.ignite.binary.BinaryRawReader;
 import org.apache.ignite.binary.BinaryRawWriter;
 import org.apache.ignite.binary.BinaryReader;
 import org.apache.ignite.binary.BinarySerializer;
+import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.binary.BinaryWriter;
 import org.apache.ignite.binary.Binarylizable;
@@ -2315,6 +2317,63 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * Test duplicate fields.
+     *
+     * @throws Exception If failed.
+     */
+    public void testDuplicateFields() throws Exception {
+        BinaryMarshaller marsh = binaryMarshaller();
+
+        DuplicateFieldsB obj = new DuplicateFieldsB(1, 2);
+
+        BinaryObjectImpl objBin = marshal(obj, marsh);
+
+        String fieldName = "x";
+        String fieldNameA = DuplicateFieldsA.class.getName() + "." + fieldName;
+        String fieldNameB = DuplicateFieldsB.class.getName() + "." + fieldName;
+
+        // Check "hasField".
+        assert !objBin.hasField(fieldName);
+        assert objBin.hasField(fieldNameA);
+        assert objBin.hasField(fieldNameB);
+
+        // Check direct field access.
+        assertNull(objBin.field(fieldName));
+        assertEquals(1, objBin.field(fieldNameA));
+        assertEquals(2, objBin.field(fieldNameB));
+
+        // Check metadata.
+        BinaryType type = objBin.type();
+
+        Collection<String> fieldNames = type.fieldNames();
+
+        assertEquals(2, fieldNames.size());
+
+        assert !fieldNames.contains(fieldName);
+        assert fieldNames.contains(fieldNameA);
+        assert fieldNames.contains(fieldNameB);
+
+        // Check field access through type.
+        BinaryField field = type.field(fieldName);
+        BinaryField fieldA = type.field(fieldNameA);
+        BinaryField fieldB = type.field(fieldNameB);
+
+        assert !field.exists(objBin);
+        assert fieldA.exists(objBin);
+        assert fieldB.exists(objBin);
+
+        assertNull(field.value(objBin));
+        assertEquals(1, fieldA.value(objBin));
+        assertEquals(2, fieldB.value(objBin));
+
+        // Check object deserialization.
+        DuplicateFieldsB deserialized = objBin.deserialize();
+
+        assertEquals(obj.xA(), deserialized.xA());
+        assertEquals(obj.xB(), deserialized.xB());
+    }
+
+    /**
      *
      */
     private static interface SomeItf {
@@ -4120,6 +4179,57 @@ public class BinaryMarshallerSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * Class B for duplicate fields test.
+     */
+    private static class DuplicateFieldsA {
+        /** Field. */
+        int x;
+
+        /**
+         * Constructor.
+         *
+         * @param x Field.
+         */
+        protected DuplicateFieldsA(int x) {
+            this.x = x;
+        }
+
+        /**
+         * @return A's field.
+         */
+        public int xA() {
+            return x;
+        }
+    }
+
+    /**
+     * Class B for duplicate fields test.
+     */
+    private static class DuplicateFieldsB extends DuplicateFieldsA {
+        /** Field. */
+        int x;
+
+        /**
+         * Constructor.
+         *
+         * @param xA Field for parent class.
+         * @param xB Field for current class.
+         */
+        public DuplicateFieldsB(int xA, int xB) {
+            super(xA);
+
+            this.x = xB;
+        }
+
+        /**
+         * @return B's field.
+         */
+        public int xB() {
+            return x;
+        }
+    }
+
+    /**
      *
      */
     private static class DecimalReflective {

http://git-wip-us.apache.org/repos/asf/ignite/blob/627134b2/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
index 1f5d6d1..b145a90 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.BinarySerializationQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.BinarySerializationQueryWithReflectiveSerializerSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
@@ -32,7 +33,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisable
 import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheBinaryObjectsScanSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheDuplicateEntityConfigurationSelfTest;
@@ -101,7 +101,6 @@ import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
 import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
 import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
 import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
 import org.apache.ignite.testframework.config.GridTestProperties;
 


[2/9] ignite git commit: ignite-1.5 Fixed benchmark configuration.

Posted by sb...@apache.org.
ignite-1.5 Fixed benchmark configuration.


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

Branch: refs/heads/ignite-1537
Commit: 8c2b6740c43b3e32c424d2862155ce384fbafe51
Parents: d8576b8
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 22 10:16:37 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 22 10:16:37 2015 +0300

----------------------------------------------------------------------
 modules/yardstick/config/benchmark-multicast.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8c2b6740/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 03cfddb..def652a 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -89,7 +89,7 @@ j=10
 CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-1-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-1-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-1-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc OPTIMISTIC -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-1-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc OPTIMISTIC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-optim-repRead-put-get-1-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc PESSIMISTIC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-pessim-repRead-put-get-1-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -txc OPTIMISTIC -txi SERIALIZABLE -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-opt-serial-put-get-1-backup,\


[4/9] ignite git commit: IGNITE-2190 - Fixing deserialization during scan query.

Posted by sb...@apache.org.
IGNITE-2190 - Fixing deserialization during scan query.


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

Branch: refs/heads/ignite-1537
Commit: 3aa6f828318ac90b73ced040ae031efad763073e
Parents: 6a91996
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Dec 22 11:08:21 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Dec 22 11:08:21 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/processors/cache/IgniteCacheProxy.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3aa6f828/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 3dada6f..271a2cf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -460,8 +460,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
         if (filter instanceof ScanQuery) {
             IgniteBiPredicate<K, V> p = ((ScanQuery)filter).getFilter();
 
-            qry = ctx.queries().createScanQuery(p != null ? p : ACCEPT_ALL, ((ScanQuery)filter).getPartition(),
-                isKeepBinary);
+            qry = ctx.queries().createScanQuery(p, ((ScanQuery)filter).getPartition(), isKeepBinary);
 
             if (grp != null)
                 qry.projection(grp);


[7/9] ignite git commit: IGNITE-2229 - Added test for the ticket.

Posted by sb...@apache.org.
IGNITE-2229 - Added test for the ticket.


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

Branch: refs/heads/ignite-1537
Commit: 3ee096613bbbe9538de949cfe20fafd7d2471de1
Parents: bbdb202
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Dec 22 12:20:39 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Dec 22 12:21:22 2015 +0300

----------------------------------------------------------------------
 ...teCacheFullTextQueryNodeJoiningSelfTest.java | 145 +++++++++++++++++++
 1 file changed, 145 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3ee09661/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java
new file mode 100644
index 0000000..5921ba0
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheFullTextQueryNodeJoiningSelfTest.java
@@ -0,0 +1,145 @@
+/*
+ * 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.cache;
+
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import javax.cache.Cache;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.QueryEntity;
+import org.apache.ignite.cache.QueryIndex;
+import org.apache.ignite.cache.QueryIndexType;
+import org.apache.ignite.cache.affinity.AffinityKey;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.TextQuery;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
+import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
+import static org.apache.ignite.cache.CacheMode.PARTITIONED;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+
+/**
+ * TODO https://issues.apache.org/jira/browse/IGNITE-2229
+ * Tests cache in-place modification logic with iterative value increment.
+ */
+public class IgniteCacheFullTextQueryNodeJoiningSelfTest extends GridCommonAbstractTest {
+    /** IP finder. */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** Number of nodes to test on. */
+    private static final int GRID_CNT = 3;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        CacheConfiguration cache = new CacheConfiguration();
+
+        cache.setCacheMode(PARTITIONED);
+        cache.setAtomicityMode(atomicityMode());
+        cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setBackups(1);
+
+        QueryEntity qryEntity = new QueryEntity();
+
+        qryEntity.setKeyType(AffinityKey.class.getName());
+        qryEntity.setValueType(IndexedEntity.class.getName());
+
+        LinkedHashMap<String, String> fields = new LinkedHashMap<>();
+
+        fields.put("val", String.class.getName());
+
+        qryEntity.setFields(fields);
+
+        qryEntity.setIndexes(Arrays.asList(new QueryIndex("val", QueryIndexType.FULLTEXT)));
+
+        cache.setQueryEntities(Arrays.asList(qryEntity));
+
+        cfg.setCacheConfiguration(cache);
+
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+        disco.setIpFinder(IP_FINDER);
+
+        TcpCommunicationSpi commSpi = new TcpCommunicationSpi();
+
+        commSpi.setSharedMemoryPort(-1);
+
+        cfg.setCommunicationSpi(commSpi);
+
+        cfg.setDiscoverySpi(disco);
+
+        return cfg;
+    }
+
+    /**
+     * @return Atomicity mode.
+     */
+    protected CacheAtomicityMode atomicityMode() {
+        return TRANSACTIONAL;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testFullTextQueryNodeJoin() throws Exception {
+        for (int r = 0; r < 5; r++) {
+            startGrids(GRID_CNT);
+
+            try {
+                for (int i = 0; i < 1000; i++) {
+                    IndexedEntity entity = new IndexedEntity("indexed " + i);
+
+                    grid(0).cache(null).put(new AffinityKey<>(i, i), entity);
+                }
+
+                Ignite started = startGrid(GRID_CNT);
+
+                for (int i = 0; i < 100; i++) {
+                    QueryCursor<Cache.Entry<AffinityKey<Integer>, IndexedEntity>> res = started.cache(null)
+                        .query(new TextQuery<AffinityKey<Integer>, IndexedEntity>(IndexedEntity.class, "indexed"));
+
+                    assertEquals(1000, res.getAll().size());
+                }
+            }
+            finally {
+                stopAllGrids();
+            }
+        }
+    }
+
+    /** */
+    private static class IndexedEntity {
+        /** */
+        private String val;
+
+        /**
+         * @param val Value.
+         */
+        private IndexedEntity(String val) {
+            this.val = val;
+        }
+    }
+}
\ No newline at end of file