ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [1/2] ignite git commit: ignite-db-x more logging, rebalance interceptor test refactoring
Date Mon, 20 Feb 2017 17:23:06 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477 fee576718 -> c5aee5b79


ignite-db-x more logging, rebalance interceptor test refactoring


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

Branch: refs/heads/ignite-3477
Commit: 5eeaa387cf4597f58cb73c6ada009bd2f5cc5e97
Parents: b37c3f8
Author: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Authored: Mon Feb 20 18:23:58 2017 +0300
Committer: Dmitriy Govorukhin <dgovorukhin@gridgain.com>
Committed: Mon Feb 20 18:23:58 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |  3 +++
 ...idAbstractCacheInterceptorRebalanceTest.java | 27 +++++++++++++-------
 2 files changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5eeaa387/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index a6a159c..7dd37a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -914,6 +914,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                 fillNodeAttributes(clusterProc.updateNotifierEnabled());
             }
             catch (Throwable e) {
+                U.error(
+                    log, "Exception during start processors, node will be stopped and close
connections", e);
+
                 // Stop discovery spi to close tcp socket.
                 ctx.discovery().stop(true);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/5eeaa387/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
index 0d360f6..f0b3cf0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
@@ -81,6 +81,8 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
 
         final CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(CACHE_NAME);
 
+        assertNotNull(interceptor);
+
         ccfg.setInterceptor(interceptor);
         ccfg.setAtomicityMode(atomicityMode());
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -109,6 +111,8 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
         stopAllGrids();
 
         super.afterTest();
+
+        interceptor = null;
     }
 
     /**
@@ -200,8 +204,6 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
      * @throws Exception If fail.
      */
     private void testRebalance(final Operation operation) throws Exception {
-        interceptor = new RebalanceUpdateInterceptor();
-
         long stopTime = System.currentTimeMillis() + 2 * 60_000;
 
         for (int iter = 0; iter < TEST_ITERATIONS && System.currentTimeMillis()
< stopTime; iter++) {
@@ -279,8 +281,10 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
      */
     private static class UpdateEntryProcessor implements EntryProcessor<Integer, Integer,
Integer> {
         /** {@inheritDoc} */
-        @Override public Integer process(final MutableEntry<Integer, Integer> entry,
-            final Object... arguments) throws EntryProcessorException {
+        @Override public Integer process(
+            final MutableEntry<Integer, Integer> entry,
+            final Object... arguments
+        ) throws EntryProcessorException {
             entry.setValue((Integer) arguments[0]);
 
             return null;
@@ -292,8 +296,10 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
      */
     private static class RemoveEntryProcessor implements EntryProcessor<Integer, Integer,
Integer> {
         /** {@inheritDoc} */
-        @Override public Integer process(final MutableEntry<Integer, Integer> entry,
-            final Object... arguments) throws EntryProcessorException {
+        @Override public Integer process(
+            final MutableEntry<Integer, Integer> entry,
+            final Object... arguments
+        ) throws EntryProcessorException {
             entry.remove();
 
             return null;
@@ -308,7 +314,10 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */
-        @Nullable @Override public Integer onBeforePut(final Cache.Entry entry, final Integer
newVal) {
+        @Nullable @Override public Integer onBeforePut(
+            final Cache.Entry entry,
+            final Integer newVal
+        ) {
             try {
                 boolean first = entry.getKey().equals(newVal);
 
@@ -341,7 +350,8 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
 
         /** {@inheritDoc} */
         @Nullable @Override public IgniteBiTuple<Boolean, Integer> onBeforeRemove(
-            final Cache.Entry<Integer, Integer> entry) {
+            final Cache.Entry<Integer, Integer> entry
+        ) {
             try {
                 assertNotNull("Null old value: " + entry, entry.getValue());
                 assertEquals("Unexpected old value: " + entry, entry.getKey(), entry.getValue());
@@ -356,5 +366,4 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends
GridComm
             return new T2<>(true, null);
         }
     }
-
 }


Mime
View raw message