ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [12/50] [abbrv] incubator-ignite git commit: IGNITE-61 - Direct marshalling
Date Tue, 10 Feb 2015 04:09:43 GMT
IGNITE-61 - Direct marshalling


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

Branch: refs/heads/sprint-1
Commit: 70c8f23d1a1da505ec35e57564c59c51f82901fc
Parents: 01b20a6
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Sat Feb 7 23:15:37 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Sat Feb 7 23:15:37 2015 -0800

----------------------------------------------------------------------
 .../GridTcpCommunicationMessageFactory.java     | 51 ++++++++++++++++++--
 .../processors/cache/GridCacheValueBytes.java   |  3 +-
 .../preloader/GridDhtPartitionExchangeId.java   |  3 +-
 .../cache/version/GridCacheVersion.java         |  3 +-
 .../processors/clock/GridClockDeltaVersion.java |  3 +-
 .../processors/fs/IgniteFsProcessor.java        | 39 ---------------
 .../ignite/internal/util/GridByteArrayList.java |  3 +-
 .../ignite/internal/util/GridLongList.java      |  3 +-
 8 files changed, 59 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
index d3091e6..b1cbe7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/direct/GridTcpCommunicationMessageFactory.java
@@ -29,13 +29,16 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.*;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
 import org.apache.ignite.internal.processors.cache.query.*;
+import org.apache.ignite.internal.processors.cache.version.*;
 import org.apache.ignite.internal.processors.clock.*;
 import org.apache.ignite.internal.processors.continuous.*;
 import org.apache.ignite.internal.processors.dataload.*;
+import org.apache.ignite.internal.processors.fs.*;
 import org.apache.ignite.internal.processors.rest.client.message.*;
 import org.apache.ignite.internal.processors.rest.handlers.task.*;
 import org.apache.ignite.internal.processors.rest.protocols.tcp.*;
 import org.apache.ignite.internal.processors.streamer.*;
+import org.apache.ignite.internal.util.*;
 import org.apache.ignite.plugin.extensions.communication.*;
 import org.apache.ignite.spi.collision.jobstealing.*;
 import org.apache.ignite.spi.communication.tcp.*;
@@ -56,7 +59,7 @@ public class GridTcpCommunicationMessageFactory {
     private static final Map<Byte, GridTcpCommunicationMessageProducer> CUSTOM = new
ConcurrentHashMap8<>();
 
     /** */
-    public static final int MAX_COMMON_TYPE = 82;
+    public static final int MAX_COMMON_TYPE = 88;
 
     static {
         registerCommon(new GridTcpCommunicationMessageProducer() {
@@ -254,7 +257,29 @@ public class GridTcpCommunicationMessageFactory {
                     case 63:
                         return new GridDataLoadResponse();
 
-                    // 64-71: IgniteFS messages.
+                    case 64:
+                        return new GridGgfsAckMessage();
+
+                    case 65:
+                        return new GridGgfsBlockKey();
+
+                    case 66:
+                        return new GridGgfsBlocksMessage();
+
+                    case 67:
+                        return new GridGgfsDeleteMessage();
+
+                    case 68:
+                        return new GridGgfsFileAffinityRange();
+
+                    case 69:
+                        return new GridGgfsFragmentizerRequest();
+
+                    case 70:
+                        return new GridGgfsFragmentizerResponse();
+
+                    case 71:
+                        return new GridGgfsSyncMessage();
 
                     case 72:
                         return new GridClientHandshakeRequestWrapper();
@@ -289,6 +314,24 @@ public class GridTcpCommunicationMessageFactory {
                     case 82:
                         return new JobStealingRequest();
 
+                    case 83:
+                        return new GridClockDeltaVersion();
+
+                    case 84:
+                        return new GridByteArrayList();
+
+                    case 85:
+                        return new GridLongList();
+
+                    case 86:
+                        return new GridCacheVersion();
+
+                    case 87:
+                        return new GridDhtPartitionExchangeId();
+
+                    case 88:
+                        return new GridCacheValueBytes();
+
                     default:
                         assert false : "Invalid message type.";
 
@@ -298,8 +341,8 @@ public class GridTcpCommunicationMessageFactory {
         },  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
            20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
            40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
-           60, 61, 62, 63, /* 64-71: IgniteFS messages. */ 72, 73, 74, 75, 76, 77, 78, 79,
-           80, 81, 82);
+           60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+           80, 81, 82, 83, 84, 85, 86, 87, 88);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
index 289db2e..cf12c71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytes.java
@@ -173,10 +173,11 @@ public class GridCacheValueBytes extends MessageAdapter {
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 88;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridCacheValueBytes _clone = new GridCacheValueBytes();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
index 622f639..c46b4c5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionExchangeId.java
@@ -216,10 +216,11 @@ public class GridDhtPartitionExchangeId extends MessageAdapter implements
Compar
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 87;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridDhtPartitionExchangeId _clone = new GridDhtPartitionExchangeId();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
index 77fdf2d..1990bb1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersion.java
@@ -337,10 +337,11 @@ public class GridCacheVersion extends MessageAdapter implements Comparable<GridC
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 86;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridCacheVersion _clone = new GridCacheVersion();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
index 06e8730..9932132 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockDeltaVersion.java
@@ -169,10 +169,11 @@ public class GridClockDeltaVersion extends MessageAdapter implements
Comparable<
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 83;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridClockDeltaVersion _clone = new GridClockDeltaVersion();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
index 9920d99..aee707c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/fs/IgniteFsProcessor.java
@@ -26,14 +26,12 @@ import org.apache.ignite.configuration.*;
 import org.apache.ignite.ignitefs.*;
 import org.apache.ignite.ignitefs.mapreduce.*;
 import org.apache.ignite.internal.*;
-import org.apache.ignite.internal.direct.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.license.*;
 import org.apache.ignite.internal.util.ipc.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.plugin.extensions.communication.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 
@@ -81,43 +79,6 @@ public class IgniteFsProcessor extends IgniteFsProcessorAdapter {
 
         assert cfgs != null && cfgs.length > 0;
 
-        // Register GGFS messages.
-        GridTcpCommunicationMessageFactory.registerCommon(new GridTcpCommunicationMessageProducer()
{
-            @Override
-            public MessageAdapter create(byte type) {
-                switch (type) {
-                    case 64:
-                        return new GridGgfsAckMessage();
-
-                    case 65:
-                        return new GridGgfsBlockKey();
-
-                    case 66:
-                        return new GridGgfsBlocksMessage();
-
-                    case 67:
-                        return new GridGgfsDeleteMessage();
-
-                    case 68:
-                        return new GridGgfsFileAffinityRange();
-
-                    case 69:
-                        return new GridGgfsFragmentizerRequest();
-
-                    case 70:
-                        return new GridGgfsFragmentizerResponse();
-
-                    case 71:
-                        return new GridGgfsSyncMessage();
-
-                    default:
-                        assert false : "Invalid GGFS message type.";
-
-                        return null;
-                }
-            }
-        }, 64, 65, 66, 67, 68, 69, 70, 71);
-
         // Register HDFS edition usage with license manager.
         GridLicenseUseRegistry.onUsage(HADOOP, getClass());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
index 8ec78d5..d9252a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridByteArrayList.java
@@ -463,10 +463,11 @@ public class GridByteArrayList extends MessageAdapter implements Externalizable
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 84;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridByteArrayList _clone = new GridByteArrayList();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/70c8f23d/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
index 5dce4e9..731dd5e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridLongList.java
@@ -561,10 +561,11 @@ public class GridLongList extends MessageAdapter implements Externalizable
{
 
     /** {@inheritDoc} */
     @Override public byte directType() {
-        return 0; // TODO: implement.
+        return 85;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("CloneDoesntCallSuperClone")
     @Override public MessageAdapter clone() {
         GridLongList _clone = new GridLongList();
 


Mime
View raw message