ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [9/9] ignite git commit: ignite-5072 - Code review.
Date Thu, 27 Apr 2017 08:05:48 GMT
ignite-5072 - Code review.


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

Branch: refs/heads/ignite-5072-merge
Commit: 83ba164e8dc2f9dfb44d60e12cb0b7fd703881d7
Parents: cde2acc
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Apr 27 11:05:53 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Apr 27 11:05:53 2017 +0300

----------------------------------------------------------------------
 .../IgniteCacheDatabaseSharedManager.java       |  4 +-
 .../cache/database/MemoryMetricsImpl.java       |  1 -
 .../cache/database/MemoryMetricsMXBeanImpl.java |  2 -
 .../core/src/main/resources/ignite.properties   |  2 +-
 .../internal/ClusterNodeMetricsSelfTest.java    |  2 +-
 .../GridServiceProcessorMultiNodeSelfTest.java  |  6 +--
 ...teCacheJoinPartitionedAndReplicatedTest.java | 57 +++++---------------
 7 files changed, 17 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
index 2c37ac0..a226272 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
@@ -306,9 +306,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
      *
      * @return {@link MemoryPolicyConfiguration configuration} of MemoryPolicy for system
cache.
      */
-    private MemoryPolicyConfiguration createSystemMemoryPolicy(long sysCacheInitSize,
-        long sysCacheMaxSize
-        ) {
+    private MemoryPolicyConfiguration createSystemMemoryPolicy(long sysCacheInitSize, long
sysCacheMaxSize) {
         MemoryPolicyConfiguration res = new MemoryPolicyConfiguration();
 
         res.setName(SYSTEM_MEMORY_POLICY_NAME);

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsImpl.java
index 28c02aa..4a7e951 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsImpl.java
@@ -23,7 +23,6 @@ import org.apache.ignite.configuration.MemoryPolicyConfiguration;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.mxbean.MemoryMetricsMXBean;
 import org.jsr166.LongAdder8;
 
 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsMXBeanImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsMXBeanImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsMXBeanImpl.java
index ca42142..05c6677 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsMXBeanImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryMetricsMXBeanImpl.java
@@ -18,8 +18,6 @@ package org.apache.ignite.internal.processors.cache.database;
 
 import org.apache.ignite.MemoryMetrics;
 import org.apache.ignite.configuration.MemoryPolicyConfiguration;
-import org.apache.ignite.internal.util.IgniteUtils;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.mxbean.MemoryMetricsMXBean;
 
 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/main/resources/ignite.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/ignite.properties b/modules/core/src/main/resources/ignite.properties
index 9e150b9..b599e11 100644
--- a/modules/core/src/main/resources/ignite.properties
+++ b/modules/core/src/main/resources/ignite.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-ignite.version=2.1.0-SNAPSHOT
+ignite.version=2.0.0-SNAPSHOT
 ignite.build=0
 ignite.revision=DEV
 ignite.rel.date=01011970

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
index 6329483..26bd941 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
@@ -113,7 +113,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest
{
 
         MemoryMetricsImpl memMetrics = getDefaultMemoryPolicyMetrics(ignite);
 
-        ((MemoryMetricsImpl)memMetrics).enableMetrics();
+        memMetrics.enableMetrics();
 
         int pageSize = getPageSize(ignite);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
index aa247fd..df7ddf1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/GridServiceProcessorMultiNodeSelfTest.java
@@ -299,13 +299,11 @@ public class GridServiceProcessorMultiNodeSelfTest extends GridServiceProcessorA
 
         checkCount(name, g.services().serviceDescriptors(), nodeCount());
 
-
-
-            latch = new CountDownLatch(1);
+        latch = new CountDownLatch(1);
 
         DummyService.exeLatch(name, latch);
 
-            int extraNodes =2;
+        int extraNodes = 2;
 
         startExtraNodes(extraNodes);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ba164e/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
index af94686..8bb7f53 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheJoinPartitionedAndReplicatedTest.java
@@ -39,7 +39,6 @@ import java.util.List;
 import java.util.concurrent.Callable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -91,8 +90,6 @@ public class IgniteCacheJoinPartitionedAndReplicatedTest extends GridCommonAbstr
         {
             CacheConfiguration ccfg = configuration(ORG_CACHE);
 
-            ccfg.setCacheMode(PARTITIONED);
-
             QueryEntity entity = new QueryEntity();
             entity.setKeyType(Integer.class.getName());
             entity.setValueType(Organization.class.getName());
@@ -160,21 +157,6 @@ public class IgniteCacheJoinPartitionedAndReplicatedTest extends GridCommonAbstr
         super.afterTestsStopped();
     }
 
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        super.beforeTest();
-
-        Ignite client = grid(2);
-
-        IgniteCache<Object, Object> personCache = client.cache(PERSON_CACHE);
-        IgniteCache<Object, Object> orgCache = client.cache(ORG_CACHE);
-        IgniteCache<Object, Object> orgCacheRepl = client.cache(ORG_CACHE_REPLICATED);
-
-        personCache.clear();
-        orgCache.clear();
-        orgCacheRepl.clear();
-    }
-
     /**
      * @throws Exception If failed.
      */
@@ -227,39 +209,24 @@ public class IgniteCacheJoinPartitionedAndReplicatedTest extends GridCommonAbstr
         checkQuery("select o.name, p._key, p.name " +
             "from \"orgRepl\".Organization o left join \"person\".Person p " +
             "on (p.orgId = o.id)", orgCacheRepl, 2);
-    }
 
-    /**
-     */
-    public void testReplicatedToPartitionedLeftJoin() {
-        Ignite client = grid(2);
-
-        IgniteCache<Object, Object> personCache = client.cache(PERSON_CACHE);
-        IgniteCache<Object, Object> orgCache = client.cache(ORG_CACHE);
-        IgniteCache<Object, Object> orgCacheRepl = client.cache(ORG_CACHE_REPLICATED);
-
-        List<Integer> keys = primaryKeys(ignite(0).cache(PERSON_CACHE), 3, 200_000);
-
-        orgCache.put(keys.get(0), new Organization(0, "org1"));
-        orgCacheRepl.put(keys.get(0), new Organization(0, "org1"));
-        personCache.put(keys.get(1), new Person(0, "p1"));
-        personCache.put(keys.get(2), new Person(0, "p2"));
-
-        checkQuery("select o.name, p._key, p.name " +
+        // Left join from replicated to partitioned cache is not supported:
+        // returns duplicates in result and must fail.
+        checkQueryFails("select o.name, p._key, p.name " +
             "from \"person\".Person p left join \"org\".Organization o " +
-            "on (p.orgId = o.id)", orgCache, 2);
+            "on (p.orgId = o.id)", orgCache);
 
-        checkQuery("select o.name, p._key, p.name " +
+        checkQueryFails("select o.name, p._key, p.name " +
             "from \"org\".Organization o right join \"person\".Person p " +
-            "on (p.orgId = o.id)", orgCache, 2);
+            "on (p.orgId = o.id)", orgCache);
 
-        checkQuery("select o.name, p._key, p.name " +
-            "from \"person\".Person p left join \"org\".Organization o " +
-            "on (p.orgId = o.id)", personCache, 2);
+        checkQueryFails("select o.name, p._key, p.name " +
+                "from \"person\".Person p left join \"org\".Organization o " +
+                "on (p.orgId = o.id)", personCache);
 
-        checkQuery("select o.name, p._key, p.name " +
-            "from \"org\".Organization o right join \"person\".Person p " +
-            "on (p.orgId = o.id)", personCache, 2);
+        checkQueryFails("select o.name, p._key, p.name " +
+                "from \"org\".Organization o right join \"person\".Person p " +
+                "on (p.orgId = o.id)", personCache);
     }
 
     /**


Mime
View raw message