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/05/12 14:00:03 UTC

[1/5] incubator-ignite git commit: #ignite-373: add test.

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-373 7b77ba92a -> ceb283542


#ignite-373: add test.


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

Branch: refs/heads/ignite-373
Commit: 656ffc09d99d58d2b42ec8e904659e6437fde10e
Parents: 61808ed
Author: ivasilinets <iv...@gridgain.com>
Authored: Thu May 7 18:22:25 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Thu May 7 18:22:25 2015 +0300

----------------------------------------------------------------------
 .../CacheContinuousQueryRestartSelfTest.java    | 145 +++++++++++++++++++
 ...ridCacheContinuousQueryAbstractSelfTest.java |  35 -----
 .../junits/common/GridCommonAbstractTest.java   |  37 +++++
 .../IgniteCacheQuerySelfTestSuite.java          |   1 +
 4 files changed, 183 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/656ffc09/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
new file mode 100644
index 0000000..039d184
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.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.query.continuous;
+
+import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
+import org.apache.ignite.cache.query.*;
+import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.marshaller.optimized.*;
+import org.apache.ignite.spi.discovery.tcp.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
+import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
+import org.apache.ignite.testframework.*;
+import org.apache.ignite.testframework.junits.common.*;
+import org.jsr166.*;
+
+import javax.cache.*;
+import javax.cache.event.*;
+
+import java.util.*;
+import java.util.concurrent.atomic.*;
+
+import static org.apache.ignite.cache.CacheRebalanceMode.*;
+import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
+
+/**
+ * Continuous queries test.
+ */
+public class CacheContinuousQueryRestartSelfTest extends GridCommonAbstractTest {
+    /** IP finder. */
+    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** Grid count. */
+    private static final int GRID_COUNT = 3;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        CacheConfiguration cacheCfg = defaultCacheConfiguration();
+
+        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
+        cacheCfg.setBackups(2);
+        cacheCfg.setRebalanceMode(ASYNC);
+        cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
+        cacheCfg.setReadThrough(true);
+        cacheCfg.setWriteThrough(true);
+        cacheCfg.setCacheStoreFactory(new StoreFactory());
+        cacheCfg.setLoadPreviousValue(true);
+
+        cfg.setCacheConfiguration(cacheCfg);
+
+        TcpDiscoverySpi disco = new TcpDiscoverySpi();
+
+        disco.setIpFinder(IP_FINDER);
+
+        cfg.setDiscoverySpi(disco);
+
+        cfg.setMarshaller(new OptimizedMarshaller(false));
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        startGrids(GRID_COUNT);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNodeJoin() throws Exception {
+        final ContinuousQuery<Integer, Integer> qry = new ContinuousQuery<>();
+
+        final Collection<CacheEntryEvent<? extends Integer, ? extends Integer>> all = new ConcurrentLinkedDeque8<>();
+
+        qry.setLocalListener(new CacheEntryUpdatedListener<Integer, Integer>() {
+            @Override public void onUpdated(Iterable<CacheEntryEvent<? extends Integer, ? extends Integer>> evts) {
+                for (CacheEntryEvent<? extends Integer, ? extends Integer> evt : evts)
+                    all.add(evt);
+            }
+        });
+
+        final AtomicInteger id = new AtomicInteger(GRID_COUNT);
+
+        final int keyCount = 1000;
+
+        final Random random = new Random(keyCount);
+
+        IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
+            @Override public void run() {
+                for (int i = 0; i < 2; ++i) {
+                    IgniteCache cache = grid(0).cache(null);
+
+                    int gridId = id.getAndIncrement();
+
+                    try (QueryCursor<Cache.Entry<Integer, Integer>> ignored = grid(0).cache(null).query(qry)) {
+                        cache.put(0, 0);
+
+                        startGrid(gridId);
+
+                        for (int j = 1; j < 40; j++)
+                            cache.put(random.nextInt(), j);
+                    }
+                    catch (Exception e) {
+                        throw new IgniteException(e);
+                    }
+                }
+            }
+        }, 5, "QueryThread");
+
+        fut.get();
+
+        for (int i = 0; i < id.get(); i++) {
+            IgniteCache<Object, Object> cache = grid(i).cache(null);
+
+            cache.removeAll();
+        }
+
+        for (int i = 0; i < GRID_COUNT; i++)
+            assertEquals("Cache is not empty [entrySet=" + grid(i).cache(null).localEntries() +
+                    ", i=" + i + ']', 0, grid(i).cache(null).localSize());
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/656ffc09/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 5a78f9f..d652cba 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -989,39 +989,4 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             }
         }
     }
-
-    /**
-     *
-     */
-    private static class StoreFactory implements Factory<CacheStore> {
-        @Override public CacheStore create() {
-            return new TestStore();
-        }
-    }
-
-    /**
-     * Store.
-     */
-    private static class TestStore extends CacheStoreAdapter<Object, Object> {
-        /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
-            for (int i = 0; i < 10; i++)
-                clo.apply(i, i);
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Object load(Object key) {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void write(javax.cache.Cache.Entry<?, ?> entry) throws CacheWriterException {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void delete(Object key) throws CacheWriterException {
-            // No-op.
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/656ffc09/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 5533897..8022a7a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.testframework.junits.common;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
@@ -38,6 +39,7 @@ import org.apache.ignite.testframework.junits.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
+import javax.cache.configuration.*;
 import javax.cache.integration.*;
 import javax.net.ssl.*;
 import java.util.*;
@@ -858,4 +860,39 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
             ccfg.getAtomicWriteOrderMode() == CacheAtomicWriteOrderMode.CLOCK)
             U.sleep(50);
     }
+
+    /**
+     *
+     */
+    public static class StoreFactory implements Factory<CacheStore> {
+        @Override public CacheStore create() {
+            return new TestStore();
+        }
+    }
+
+    /**
+     * Store.
+     */
+    public static class TestStore extends CacheStoreAdapter<Object, Object> {
+        /** {@inheritDoc} */
+        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
+            for (int i = 0; i < 10; i++)
+                clo.apply(i, i);
+        }
+
+        /** {@inheritDoc} */
+        @Nullable @Override public Object load(Object key) {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void write(javax.cache.Cache.Entry<?, ?> entry) throws CacheWriterException {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void delete(Object key) throws CacheWriterException {
+            // No-op.
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/656ffc09/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 69d7548..da3bf5c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -92,6 +92,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
+        suite.addTestSuite(CacheContinuousQueryRestartSelfTest.class);
 
         // Reduce fields queries.
         suite.addTestSuite(GridCacheReduceFieldsQueryLocalSelfTest.class);


[5/5] incubator-ignite git commit: # ignite-373

Posted by sb...@apache.org.
# ignite-373


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

Branch: refs/heads/ignite-373
Commit: ceb283542744a8a51fadc1ea9f70de1cfd7b024f
Parents: bf78538
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 14:53:53 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 14:57:05 2015 +0300

----------------------------------------------------------------------
 .../GridDistributedCacheAdapter.java            |  43 +++---
 .../CacheContinuousQueryRestartSelfTest.java    | 145 -------------------
 ...ridCacheContinuousQueryAbstractSelfTest.java |   4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   1 -
 4 files changed, 21 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ceb28354/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 91b7be8..d10ab56 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -314,33 +314,31 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
 
                     dataLdr.receiver(DataStreamerCacheUpdaters.<KeyCacheObject, Object>batched());
 
-                    for (int part = 0; part < dht.affinity().partitions(); ++part) {
-                        if (ctx.affinity().belongs(ctx.localNode(), part, topVer)) {
-                            GridDhtLocalPartition locPart = dht.topology().localPartition(part, topVer, false);
-
-                            if (locPart == null || locPart.state() != OWNING || !locPart.reserve())
-                                return false;
-
-                            try {
-                                if (!locPart.isEmpty() && locPart.primary(topVer)) {
-                                    for (GridDhtCacheEntry o : locPart.entries()) {
-                                        if (!o.obsoleteOrDeleted())
-                                            dataLdr.removeDataInternal(o.key());
-                                    }
-                                }
+                    for (int part : ctx.affinity().primaryPartitions(ctx.localNodeId(), topVer)) {
+                        GridDhtLocalPartition locPart = dht.topology().localPartition(part, topVer, false);
 
-                                GridCloseableIterator<Map.Entry<byte[], GridCacheSwapEntry>> iter =
-                                    ctx.swap().iterator(part);
+                        if (locPart == null || locPart.state() != OWNING || !locPart.reserve())
+                            return false;
 
-                                if (iter != null) {
-                                    for (Map.Entry<byte[], GridCacheSwapEntry> e : iter)
-                                        dataLdr.removeDataInternal(ctx.toCacheKeyObject(e.getKey()));
+                        try {
+                            if (!locPart.isEmpty()) {
+                                for (GridDhtCacheEntry o : locPart.entries()) {
+                                    if (!o.obsoleteOrDeleted())
+                                        dataLdr.removeDataInternal(o.key());
                                 }
                             }
-                            finally {
-                                locPart.release();
+
+                            GridCloseableIterator<Map.Entry<byte[], GridCacheSwapEntry>> iter =
+                                ctx.swap().iterator(part);
+
+                            if (iter != null) {
+                                for (Map.Entry<byte[], GridCacheSwapEntry> e : iter)
+                                    dataLdr.removeDataInternal(ctx.toCacheKeyObject(e.getKey()));
                             }
                         }
+                        finally {
+                            locPart.release();
+                        }
                     }
                 }
 
@@ -357,9 +355,6 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
                 ctx.gate().leave();
             }
 
-            if (!ctx.affinity().affinityTopologyVersion().equals(topVer))
-                return false;
-
             return true;
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ceb28354/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
deleted file mode 100644
index bd03489..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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.query.continuous;
-
-import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
-import org.apache.ignite.marshaller.optimized.*;
-import org.apache.ignite.spi.discovery.tcp.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.testframework.*;
-import org.apache.ignite.testframework.junits.common.*;
-import org.jsr166.*;
-
-import javax.cache.*;
-import javax.cache.event.*;
-
-import java.util.*;
-import java.util.concurrent.atomic.*;
-
-import static org.apache.ignite.cache.CacheRebalanceMode.*;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.*;
-
-/**
- * Continuous queries test.
- */
-public class CacheContinuousQueryRestartSelfTest extends GridCommonAbstractTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** Grid count. */
-    private static final int GRID_COUNT = 3;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        CacheConfiguration cacheCfg = defaultCacheConfiguration();
-
-        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-        cacheCfg.setBackups(2);
-        cacheCfg.setRebalanceMode(ASYNC);
-        cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
-        cacheCfg.setReadThrough(true);
-        cacheCfg.setWriteThrough(true);
-        cacheCfg.setCacheStoreFactory(new GridCacheContinuousQueryAbstractSelfTest.StoreFactory());
-        cacheCfg.setLoadPreviousValue(true);
-
-        cfg.setCacheConfiguration(cacheCfg);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(IP_FINDER);
-
-        cfg.setDiscoverySpi(disco);
-
-        cfg.setMarshaller(new OptimizedMarshaller(false));
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        startGrids(GRID_COUNT);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNodeJoin() throws Exception {
-        final ContinuousQuery<Integer, Integer> qry = new ContinuousQuery<>();
-
-        final Collection<CacheEntryEvent<? extends Integer, ? extends Integer>> all = new ConcurrentLinkedDeque8<>();
-
-        qry.setLocalListener(new CacheEntryUpdatedListener<Integer, Integer>() {
-            @Override public void onUpdated(Iterable<CacheEntryEvent<? extends Integer, ? extends Integer>> evts) {
-                for (CacheEntryEvent<? extends Integer, ? extends Integer> evt : evts)
-                    all.add(evt);
-            }
-        });
-
-        final AtomicInteger id = new AtomicInteger(GRID_COUNT);
-
-        final int keyCount = 1000;
-
-        final Random random = new Random(keyCount);
-
-        IgniteInternalFuture fut = GridTestUtils.runMultiThreadedAsync(new Runnable() {
-            @Override public void run() {
-                for (int i = 0; i < 2; ++i) {
-                    IgniteCache cache = grid(0).cache(null);
-
-                    int gridId = id.getAndIncrement();
-
-                    try (QueryCursor<Cache.Entry<Integer, Integer>> ignored = grid(0).cache(null).query(qry)) {
-                        cache.put(0, 0);
-
-                        startGrid(gridId);
-
-                        for (int j = 1; j < 40; j++)
-                            cache.put(random.nextInt(), j);
-                    }
-                    catch (Exception e) {
-                        throw new IgniteException(e);
-                    }
-                }
-            }
-        }, 5, "QueryThread");
-
-        fut.get();
-
-        for (int i = 0; i < id.get(); i++) {
-            IgniteCache<Object, Object> cache = grid(i).cache(null);
-
-            cache.removeAll();
-        }
-
-        for (int i = 0; i < GRID_COUNT; i++)
-            assertEquals("Cache is not empty [entrySet=" + grid(i).cache(null).localEntries() +
-                    ", i=" + i + ']', 0, grid(i).cache(null).localSize());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ceb28354/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 86f6c9c..5a78f9f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -993,7 +993,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
     /**
      *
      */
-    public static class StoreFactory implements Factory<CacheStore> {
+    private static class StoreFactory implements Factory<CacheStore> {
         @Override public CacheStore create() {
             return new TestStore();
         }
@@ -1002,7 +1002,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
     /**
      * Store.
      */
-    public static class TestStore extends CacheStoreAdapter<Object, Object> {
+    private static class TestStore extends CacheStoreAdapter<Object, Object> {
         /** {@inheritDoc} */
         @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
             for (int i = 0; i < 10; i++)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ceb28354/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index c781193..f42963a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -93,7 +93,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
-        suite.addTestSuite(CacheContinuousQueryRestartSelfTest.class);
 
         // Reduce fields queries.
         suite.addTestSuite(GridCacheReduceFieldsQueryLocalSelfTest.class);


[4/5] incubator-ignite git commit: Merge remote-tracking branch 'origin/ignite-373' into ignite-373

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


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

Branch: refs/heads/ignite-373
Commit: bf78538b38858dc6b2bfdd8bfce227419a55f582
Parents: 33637a1 7b77ba9
Author: sboikov <sb...@gridgain.com>
Authored: Tue May 12 14:46:01 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue May 12 14:46:01 2015 +0300

----------------------------------------------------------------------
 .../TcpDiscoveryCloudIpFinderSelfTest.java      |   2 -
 .../GridDistributedCacheAdapter.java            |  71 ++--
 .../processors/igfs/IgfsDeleteWorker.java       |   4 +
 .../processors/resource/GridResourceField.java  |  11 +
 .../processors/resource/GridResourceIoc.java    | 387 ++++++-------------
 .../processors/resource/GridResourceMethod.java |  13 +
 .../resource/GridResourceProcessor.java         |   4 +-
 .../ignite/internal/util/IgniteUtils.java       |  15 +
 .../spi/discovery/tcp/TcpDiscoverySpi.java      |  24 +-
 .../cache/CacheRemoveAllSelfTest.java           |  81 ++++
 .../testsuites/IgniteCacheTestSuite3.java       |   3 -
 .../testsuites/IgniteCacheTestSuite4.java       |   2 +
 parent/pom.xml                                  |   2 +
 pom.xml                                         |  33 --
 14 files changed, 329 insertions(+), 323 deletions(-)
----------------------------------------------------------------------



[2/5] incubator-ignite git commit: Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-373

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-sprint-5' into ignite-373


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

Branch: refs/heads/ignite-373
Commit: 561353bc4ef4070edb063ddcfee371715fb91cb7
Parents: 656ffc0 de19191
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri May 8 12:29:57 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri May 8 12:29:57 2015 +0300

----------------------------------------------------------------------
 examples/pom.xml                                |    2 +-
 modules/aop/pom.xml                             |    2 +-
 modules/aws/pom.xml                             |    2 +-
 modules/clients/pom.xml                         |    2 +-
 modules/cloud/pom.xml                           |    4 +-
 modules/codegen/pom.xml                         |    2 +-
 .../ignite/codegen/MessageCodeGenerator.java    |    4 +-
 modules/core/pom.xml                            |    2 +-
 .../communication/GridIoMessageFactory.java     |    4 +-
 .../cache/DynamicCacheDescriptor.java           |   16 +-
 .../processors/cache/GridCacheAdapter.java      |  544 +-
 .../cache/GridCacheEvictionManager.java         |    2 +-
 .../processors/cache/GridCacheMapEntry.java     |   18 +-
 .../GridCachePartitionExchangeManager.java      |    3 +
 .../processors/cache/GridCacheProcessor.java    |  189 +-
 .../processors/cache/GridCacheProxyImpl.java    |   24 -
 .../processors/cache/GridCacheSwapManager.java  |  215 +-
 .../processors/cache/GridCacheTtlManager.java   |   42 +-
 .../processors/cache/GridCacheUtils.java        |    5 +-
 .../processors/cache/IgniteInternalCache.java   |   27 -
 ...ridCacheOptimisticCheckPreparedTxFuture.java |  434 --
 ...idCacheOptimisticCheckPreparedTxRequest.java |  232 -
 ...dCacheOptimisticCheckPreparedTxResponse.java |  179 -
 .../distributed/GridCacheTxRecoveryFuture.java  |  506 ++
 .../distributed/GridCacheTxRecoveryRequest.java |  261 +
 .../GridCacheTxRecoveryResponse.java            |  182 +
 .../GridDistributedTxRemoteAdapter.java         |    2 +-
 .../distributed/dht/GridDhtLocalPartition.java  |    2 +-
 .../dht/GridPartitionedGetFuture.java           |    2 +-
 .../colocated/GridDhtColocatedLockFuture.java   |    2 +
 .../distributed/near/GridNearCacheAdapter.java  |   10 -
 .../processors/cache/local/GridLocalCache.java  |    8 +-
 .../local/atomic/GridLocalAtomicCache.java      |   27 +-
 .../cache/query/GridCacheQueryManager.java      |   21 +-
 .../cache/query/GridCacheSqlQuery.java          |    2 +-
 .../cache/query/GridCacheTwoStepQuery.java      |   17 +
 .../cache/transactions/IgniteInternalTx.java    |    5 +-
 .../cache/transactions/IgniteTxAdapter.java     |    2 +-
 .../cache/transactions/IgniteTxHandler.java     |   38 +-
 .../transactions/IgniteTxLocalAdapter.java      |   14 +-
 .../cache/transactions/IgniteTxManager.java     |  173 +-
 .../datastreamer/DataStreamerImpl.java          |    2 +
 .../processors/igfs/IgfsDataManager.java        |    3 +
 .../processors/igfs/IgfsMetaManager.java        |    2 +-
 .../internal/processors/igfs/IgfsUtils.java     |   11 +-
 .../offheap/GridOffHeapProcessor.java           |   17 +
 .../util/lang/GridFilteredIterator.java         |    2 +-
 .../ignite/internal/util/lang/GridFunc.java     | 7218 +++++-------------
 .../util/offheap/GridOffHeapPartitionedMap.java |    9 +
 .../unsafe/GridUnsafePartitionedMap.java        |  155 +-
 .../internal/visor/query/VisorQueryArg.java     |   14 +-
 .../internal/visor/query/VisorQueryJob.java     |    2 +
 .../resources/META-INF/classnames.properties    |   12 +-
 .../core/src/main/resources/ignite.properties   |    2 +-
 .../internal/GridUpdateNotifierSelfTest.java    |   21 +-
 .../processors/cache/CacheGetFromJobTest.java   |  110 +
 .../GridCacheAbstractFailoverSelfTest.java      |    4 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |  227 +-
 .../cache/GridCacheAbstractSelfTest.java        |    4 +-
 .../cache/OffHeapTieredTransactionSelfTest.java |  127 +
 ...CacheLoadingConcurrentGridStartSelfTest.java |   49 +-
 .../GridCacheAbstractNodeRestartSelfTest.java   |   94 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |    2 +-
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   43 +
 ...ionedNearDisabledOffHeapFullApiSelfTest.java |    8 +-
 ...DisabledOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...abledOffHeapTieredAtomicFullApiSelfTest.java |   56 +
 ...earDisabledOffHeapTieredFullApiSelfTest.java |   33 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...rDisabledPrimaryNodeFailureRecoveryTest.java |   31 +
 ...rtitionedPrimaryNodeFailureRecoveryTest.java |   31 +
 ...woBackupsPrimaryNodeFailureRecoveryTest.java |   37 +
 ...ePrimaryNodeFailureRecoveryAbstractTest.java |  533 ++
 ...CacheAtomicOffHeapTieredFullApiSelfTest.java |   32 +
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...yWriteOrderOffHeapTieredFullApiSelfTest.java |   33 +
 ...erOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 ...achePartitionedMultiNodeFullApiSelfTest.java |   15 +-
 .../GridCachePartitionedNodeRestartTest.java    |    4 +-
 ...dCachePartitionedOffHeapFullApiSelfTest.java |    8 +-
 ...titionedOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...PartitionedOffHeapTieredFullApiSelfTest.java |   32 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   72 +
 ...ePartitionedOptimisticTxNodeRestartTest.java |    4 +-
 .../GridCacheReplicatedNodeRestartSelfTest.java |    2 +
 ...idCacheReplicatedOffHeapFullApiSelfTest.java |    8 +-
 ...plicatedOffHeapMultiNodeFullApiSelfTest.java |    8 +-
 ...eReplicatedOffHeapTieredFullApiSelfTest.java |   33 +
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 +
 .../IgniteCacheExpiryPolicyAbstractTest.java    |    2 +-
 .../IgniteCacheExpiryPolicyTestSuite.java       |    2 +
 .../expiry/IgniteCacheTtlCleanupSelfTest.java   |   85 +
 ...LocalAtomicOffHeapTieredFullApiSelfTest.java |   32 +
 .../GridCacheLocalOffHeapFullApiSelfTest.java   |    6 +-
 ...dCacheLocalOffHeapTieredFullApiSelfTest.java |   32 +
 .../igfs/IgfsClientCacheSelfTest.java           |  132 +
 .../processors/igfs/IgfsOneClientNodeTest.java  |  133 +
 .../processors/igfs/IgfsStreamsSelfTest.java    |    2 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    1 +
 .../IgniteCacheFullApiSelfTestSuite.java        |   18 +
 .../testsuites/IgniteCacheRestartTestSuite.java |    5 +-
 .../IgniteCacheTxRecoverySelfTestSuite.java     |    4 +
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |    3 +
 modules/extdata/p2p/pom.xml                     |    2 +-
 modules/extdata/uri/pom.xml                     |    2 +-
 modules/gce/pom.xml                             |    4 +-
 modules/geospatial/pom.xml                      |    2 +-
 modules/hadoop/pom.xml                          |    2 +-
 modules/hibernate/pom.xml                       |    2 +-
 modules/indexing/pom.xml                        |    2 +-
 .../processors/query/h2/IgniteH2Indexing.java   |    4 +
 .../processors/query/h2/sql/GridSqlQuery.java   |   20 +
 .../query/h2/sql/GridSqlQueryParser.java        |   10 +-
 .../query/h2/sql/GridSqlQuerySplitter.java      |   11 +-
 .../processors/query/h2/sql/GridSqlSelect.java  |    2 +-
 .../processors/query/h2/sql/GridSqlUnion.java   |    2 +-
 .../query/h2/twostep/GridMapQueryExecutor.java  |    3 +
 .../h2/twostep/GridReduceQueryExecutor.java     |  119 +-
 .../IgniteCacheAbstractFieldsQuerySelfTest.java |   21 +
 ...eQueryMultiThreadedOffHeapTiredSelfTest.java |   37 +
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   29 +-
 .../IgniteCacheQuerySelfTestSuite.java          |    1 +
 modules/jcl/pom.xml                             |    2 +-
 modules/jta/pom.xml                             |    2 +-
 modules/log4j/pom.xml                           |    2 +-
 modules/rest-http/pom.xml                       |    2 +-
 modules/scalar/pom.xml                          |    2 +-
 .../ignite/scalar/ScalarConversions.scala       |    8 -
 modules/schedule/pom.xml                        |    2 +-
 modules/schema-import/pom.xml                   |    2 +-
 .../ignite/schema/generator/CodeGenerator.java  |   41 +-
 modules/slf4j/pom.xml                           |    2 +-
 modules/spring/pom.xml                          |    2 +-
 modules/ssh/pom.xml                             |    2 +-
 modules/tools/pom.xml                           |    2 +-
 modules/urideploy/pom.xml                       |    2 +-
 modules/visor-console/pom.xml                   |    2 +-
 .../commands/cache/VisorCacheScanCommand.scala  |    2 +-
 modules/visor-plugins/pom.xml                   |    2 +-
 modules/web/pom.xml                             |    2 +-
 modules/yardstick/pom.xml                       |    2 +-
 pom.xml                                         |   36 +-
 142 files changed, 6032 insertions(+), 7305 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/561353bc/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------


[3/5] incubator-ignite git commit: #ignite-373: Revert changes in GridCommonAbstractTest

Posted by sb...@apache.org.
#ignite-373: Revert changes in GridCommonAbstractTest


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

Branch: refs/heads/ignite-373
Commit: 33637a1b9dddb9ab47c2527267ebc45c9ab26b37
Parents: 561353b
Author: ivasilinets <iv...@gridgain.com>
Authored: Fri May 8 12:34:55 2015 +0300
Committer: ivasilinets <iv...@gridgain.com>
Committed: Fri May 8 12:34:55 2015 +0300

----------------------------------------------------------------------
 .../CacheContinuousQueryRestartSelfTest.java    |  2 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java | 35 ++++++++++++++++++
 .../junits/common/GridCommonAbstractTest.java   | 37 --------------------
 3 files changed, 36 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33637a1b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
index 039d184..bd03489 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRestartSelfTest.java
@@ -61,7 +61,7 @@ public class CacheContinuousQueryRestartSelfTest extends GridCommonAbstractTest
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setReadThrough(true);
         cacheCfg.setWriteThrough(true);
-        cacheCfg.setCacheStoreFactory(new StoreFactory());
+        cacheCfg.setCacheStoreFactory(new GridCacheContinuousQueryAbstractSelfTest.StoreFactory());
         cacheCfg.setLoadPreviousValue(true);
 
         cfg.setCacheConfiguration(cacheCfg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33637a1b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index d652cba..86f6c9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -989,4 +989,39 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             }
         }
     }
+
+    /**
+     *
+     */
+    public static class StoreFactory implements Factory<CacheStore> {
+        @Override public CacheStore create() {
+            return new TestStore();
+        }
+    }
+
+    /**
+     * Store.
+     */
+    public static class TestStore extends CacheStoreAdapter<Object, Object> {
+        /** {@inheritDoc} */
+        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
+            for (int i = 0; i < 10; i++)
+                clo.apply(i, i);
+        }
+
+        /** {@inheritDoc} */
+        @Nullable @Override public Object load(Object key) {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void write(javax.cache.Cache.Entry<?, ?> entry) throws CacheWriterException {
+            // No-op.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void delete(Object key) throws CacheWriterException {
+            // No-op.
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/33637a1b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 8022a7a..5533897 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.testframework.junits.common;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.configuration.*;
@@ -39,7 +38,6 @@ import org.apache.ignite.testframework.junits.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
-import javax.cache.configuration.*;
 import javax.cache.integration.*;
 import javax.net.ssl.*;
 import java.util.*;
@@ -860,39 +858,4 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
             ccfg.getAtomicWriteOrderMode() == CacheAtomicWriteOrderMode.CLOCK)
             U.sleep(50);
     }
-
-    /**
-     *
-     */
-    public static class StoreFactory implements Factory<CacheStore> {
-        @Override public CacheStore create() {
-            return new TestStore();
-        }
-    }
-
-    /**
-     * Store.
-     */
-    public static class TestStore extends CacheStoreAdapter<Object, Object> {
-        /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, Object... args) {
-            for (int i = 0; i < 10; i++)
-                clo.apply(i, i);
-        }
-
-        /** {@inheritDoc} */
-        @Nullable @Override public Object load(Object key) {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void write(javax.cache.Cache.Entry<?, ?> entry) throws CacheWriterException {
-            // No-op.
-        }
-
-        /** {@inheritDoc} */
-        @Override public void delete(Object key) throws CacheWriterException {
-            // No-op.
-        }
-    }
 }