ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [2/2] incubator-ignite git commit: IGNITE-141 - Marshallers refactoring
Date Wed, 04 Mar 2015 03:27:08 GMT
IGNITE-141 - Marshallers refactoring


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

Branch: refs/heads/ignite-141
Commit: 75b231f741228cb988c7a51511cdd759e4f772b4
Parents: 0147c4e
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Tue Mar 3 19:11:50 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Tue Mar 3 19:11:50 2015 -0800

----------------------------------------------------------------------
 .../managers/communication/GridIoManager.java   | 32 ++++++++++++++++++--
 .../processors/igfs/IgfsFileInfoSelfTest.java   |  4 +--
 .../streamer/GridStreamerFailoverSelfTest.java  |  2 +-
 3 files changed, 32 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/75b231f7/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index ca84cb1..3b8eabd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -389,6 +389,35 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
     /** {@inheritDoc} */
     @SuppressWarnings("BusyWait")
     @Override public void onKernalStop0(boolean cancel) {
+//        // No more communication messages.
+//        getSpi().setListener(null);
+//
+//        busyLock.writeLock();
+//
+//        U.shutdownNow(getClass(), affPool, log);
+//
+//        boolean interrupted = false;
+//
+//        while (workersCnt.sum() != 0) {
+//            try {
+//                Thread.sleep(200);
+//            }
+//            catch (InterruptedException ignored) {
+//                interrupted = true;
+//            }
+//        }
+//
+//        if (interrupted)
+//            Thread.currentThread().interrupt();
+//
+//        GridEventStorageManager evtMgr = ctx.event();
+//
+//        if (evtMgr != null && discoLsnr != null)
+//            evtMgr.removeLocalEventListener(discoLsnr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop(boolean cancel) throws IgniteCheckedException {
         // No more communication messages.
         getSpi().setListener(null);
 
@@ -414,10 +443,7 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
 
         if (evtMgr != null && discoLsnr != null)
             evtMgr.removeLocalEventListener(discoLsnr);
-    }
 
-    /** {@inheritDoc} */
-    @Override public void stop(boolean cancel) throws IgniteCheckedException {
         stopSpi();
 
         // Clear cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/75b231f7/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
index a666a0a..c7eca62 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsFileInfoSelfTest.java
@@ -40,6 +40,8 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testSerialization() throws Exception {
+        marshaller.setContext(new MarshallerContextTestImpl());
+
         final int max = Integer.MAX_VALUE;
 
         multithreaded(new Callable<Object>() {
@@ -83,8 +85,6 @@ public class IgfsFileInfoSelfTest extends IgfsCommonAbstractTest {
      * @throws IgniteCheckedException In case of any marshalling exception.
      */
     private <T> T mu(T obj) throws IgniteCheckedException {
-        marshaller.setContext(new MarshallerContextTestImpl());
-
         return marshaller.unmarshal(marshaller.marshal(obj), null);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/75b231f7/modules/core/src/test/java/org/apache/ignite/internal/processors/streamer/GridStreamerFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/streamer/GridStreamerFailoverSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/streamer/GridStreamerFailoverSelfTest.java
index 201d5d4..a7f99d8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/streamer/GridStreamerFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/streamer/GridStreamerFailoverSelfTest.java
@@ -162,7 +162,7 @@ public class GridStreamerFailoverSelfTest extends GridCommonAbstractTest
{
 
                     return null;
                 }
-            }, 1);
+            }, 1, "restarter");
 
             final Collection<Object> failed = new ConcurrentLinkedQueue<>();
 


Mime
View raw message