Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25D7810594 for ; Mon, 22 Dec 2014 23:40:22 +0000 (UTC) Received: (qmail 25237 invoked by uid 500); 22 Dec 2014 23:40:22 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 25206 invoked by uid 500); 22 Dec 2014 23:40:22 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 25189 invoked by uid 99); 22 Dec 2014 23:40:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2014 23:40:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Dec 2014 23:40:16 +0000 Received: (qmail 16306 invoked by uid 99); 22 Dec 2014 23:39:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2014 23:39:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3EEB2A33D34; Mon, 22 Dec 2014 23:39:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 22 Dec 2014 23:40:10 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [16/20] incubator-ignite git commit: IGNITE-61 - Portable format in direct marshalling X-Virus-Checked: Checked by ClamAV on apache.org http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerResponse.java index 9d71c9c..5ea3ae5 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsFragmentizerResponse.java @@ -82,7 +82,7 @@ public class GridGgfsFragmentizerResponse extends GridGgfsCommunicationMessage { switch (commState.idx) { case 0: - if (!commState.putGridUuid(null, fileId)) + if (!commState.putGridUuid("fileId", fileId)) return false; commState.idx++; @@ -102,7 +102,7 @@ public class GridGgfsFragmentizerResponse extends GridGgfsCommunicationMessage { switch (commState.idx) { case 0: - IgniteUuid fileId0 = commState.getGridUuid(null); + IgniteUuid fileId0 = commState.getGridUuid("fileId"); if (fileId0 == GRID_UUID_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSyncMessage.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSyncMessage.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSyncMessage.java index 06fbcef..4cbec78 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSyncMessage.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/ggfs/GridGgfsSyncMessage.java @@ -100,13 +100,13 @@ public class GridGgfsSyncMessage extends GridGgfsCommunicationMessage { switch (commState.idx) { case 0: - if (!commState.putLong(null, order)) + if (!commState.putLong("order", order)) return false; commState.idx++; case 1: - if (!commState.putBoolean(null, res)) + if (!commState.putBoolean("res", res)) return false; commState.idx++; @@ -129,7 +129,7 @@ public class GridGgfsSyncMessage extends GridGgfsCommunicationMessage { if (buf.remaining() < 8) return false; - order = commState.getLong(null); + order = commState.getLong("order"); commState.idx++; @@ -137,7 +137,7 @@ public class GridGgfsSyncMessage extends GridGgfsCommunicationMessage { if (buf.remaining() < 1) return false; - res = commState.getBoolean(null); + res = commState.getBoolean("res"); commState.idx++; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeRequestWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeRequestWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeRequestWrapper.java index 601428c..df9fd66 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeRequestWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeRequestWrapper.java @@ -62,7 +62,7 @@ public class GridClientHandshakeRequestWrapper extends GridTcpCommunicationMessa switch (commState.idx) { case 0: - if (!commState.putByteArray(null, bytes)) + if (!commState.putByteArray("bytes", bytes)) return false; commState.idx++; @@ -78,12 +78,12 @@ public class GridClientHandshakeRequestWrapper extends GridTcpCommunicationMessa switch (commState.idx) { case 0: -// byte[] bytes0 = commState.getByteArray(null, GridClientHandshakeRequest.PACKET_SIZE); -// -// if (bytes0 == BYTE_ARR_NOT_READ) -// return false; -// -// bytes = bytes0; + byte[] bytes0 = commState.getByteArray("bytes"); + + if (bytes0 == BYTE_ARR_NOT_READ) + return false; + + bytes = bytes0; commState.idx++; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeResponseWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeResponseWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeResponseWrapper.java index c77964b..bf3ee7c 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeResponseWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientHandshakeResponseWrapper.java @@ -49,6 +49,15 @@ public class GridClientHandshakeResponseWrapper extends GridTcpCommunicationMess commState.typeWritten = true; } + switch (commState.idx) { + case 0: + if (!commState.putByte("code", code)) + return false; + + commState.idx++; + + } + return true; } @@ -56,6 +65,17 @@ public class GridClientHandshakeResponseWrapper extends GridTcpCommunicationMess @Override public boolean readFrom(ByteBuffer buf) { commState.setBuffer(buf); + switch (commState.idx) { + case 0: + if (buf.remaining() < 1) + return false; + + code = commState.getByte("code"); + + commState.idx++; + + } + return true; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMessageWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMessageWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMessageWrapper.java index 4779afb..128c657 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMessageWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientMessageWrapper.java @@ -133,32 +133,32 @@ public class GridClientMessageWrapper extends GridTcpCommunicationMessageAdapter switch (commState.idx) { case 0: - if (!commState.putInt(null, msgSize)) + if (!commState.putUuid("clientId", clientId)) return false; commState.idx++; case 1: - if (!commState.putLong(null, reqId)) + if (!commState.putUuid("destId", destId)) return false; commState.idx++; case 2: - if (!commState.putUuid(null, clientId)) + if (!commState.putByteBuffer("msg", msg)) return false; commState.idx++; case 3: - if (!commState.putUuid(null, destId)) + if (!commState.putInt("msgSize", msgSize)) return false; commState.idx++; case 4: -// if (!commState.putByteBuffer(null, msg)) -// return false; + if (!commState.putLong("reqId", reqId)) + return false; commState.idx++; @@ -173,53 +173,51 @@ public class GridClientMessageWrapper extends GridTcpCommunicationMessageAdapter switch (commState.idx) { case 0: - if (buf.remaining() < 4) - return false; + UUID clientId0 = commState.getUuid("clientId"); - msgSize = commState.getInt(null); + if (clientId0 == UUID_NOT_READ) + return false; - if (msgSize == 0) // Ping message. - return true; + clientId = clientId0; commState.idx++; case 1: - if (buf.remaining() < 8) + UUID destId0 = commState.getUuid("destId"); + + if (destId0 == UUID_NOT_READ) return false; - reqId = commState.getLong(null); + destId = destId0; commState.idx++; case 2: - UUID clientId0 = commState.getUuid(null); + ByteBuffer msg0 = commState.getByteBuffer("msg"); - if (clientId0 == UUID_NOT_READ) + if (msg0 == BYTE_BUF_NOT_READ) return false; - clientId = clientId0; + msg = msg0; commState.idx++; case 3: - UUID destId0 = commState.getUuid(null); - - if (destId0 == UUID_NOT_READ) + if (buf.remaining() < 4) return false; - destId = destId0; + msgSize = commState.getInt("msgSize"); commState.idx++; case 4: -// byte[] msg0 = commState.getByteArray(null, msgSize - 40); -// -// if (msg0 == BYTE_ARR_NOT_READ) -// return false; -// -// msg = ByteBuffer.wrap(msg0); -// -// commState.idx++; + if (buf.remaining() < 8) + return false; + + reqId = commState.getLong("reqId"); + + commState.idx++; + } return true; @@ -244,8 +242,8 @@ public class GridClientMessageWrapper extends GridTcpCommunicationMessageAdapter @Override protected void clone0(GridTcpCommunicationMessageAdapter _msg) { GridClientMessageWrapper _clone = (GridClientMessageWrapper)_msg; - _clone.reqId = reqId; _clone.msgSize = msgSize; + _clone.reqId = reqId; _clone.clientId = clientId; _clone.destId = destId; _clone.msg = msg; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPingPacketWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPingPacketWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPingPacketWrapper.java index b719531..ea1da3d 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPingPacketWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/client/message/GridClientPingPacketWrapper.java @@ -37,7 +37,7 @@ public class GridClientPingPacketWrapper extends GridTcpCommunicationMessageAdap switch (commState.idx) { case 0: - if (!commState.putInt(null, size)) + if (!commState.putInt("size", size)) return false; commState.idx++; @@ -49,7 +49,20 @@ public class GridClientPingPacketWrapper extends GridTcpCommunicationMessageAdap /** {@inheritDoc} */ @Override public boolean readFrom(ByteBuffer buf) { - throw new UnsupportedOperationException(); + commState.setBuffer(buf); + + switch (commState.idx) { + case 0: + if (buf.remaining() < 4) + return false; + + size = commState.getInt("size"); + + commState.idx++; + + } + + return true; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultRequest.java index 2b66ef6..1894d03 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultRequest.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultRequest.java @@ -123,13 +123,13 @@ public class GridTaskResultRequest extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - if (!commState.putGridUuid(null, taskId)) + if (!commState.putGridUuid("taskId", taskId)) return false; commState.idx++; case 1: - if (!commState.putByteArray(null, topicBytes)) + if (!commState.putByteArray("topicBytes", topicBytes)) return false; commState.idx++; @@ -146,7 +146,7 @@ public class GridTaskResultRequest extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - IgniteUuid taskId0 = commState.getGridUuid(null); + IgniteUuid taskId0 = commState.getGridUuid("taskId"); if (taskId0 == GRID_UUID_NOT_READ) return false; @@ -156,7 +156,7 @@ public class GridTaskResultRequest extends GridTcpCommunicationMessageAdapter { commState.idx++; case 1: - byte[] topicBytes0 = commState.getByteArray(null); + byte[] topicBytes0 = commState.getByteArray("topicBytes"); if (topicBytes0 == BYTE_ARR_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultResponse.java index ad9e42f..6d30432 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/handlers/task/GridTaskResultResponse.java @@ -143,25 +143,25 @@ public class GridTaskResultResponse extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - if (!commState.putString(null, err)) + if (!commState.putString("err", err)) return false; commState.idx++; case 1: - if (!commState.putBoolean(null, finished)) + if (!commState.putBoolean("finished", finished)) return false; commState.idx++; case 2: - if (!commState.putBoolean(null, found)) + if (!commState.putBoolean("found", found)) return false; commState.idx++; case 3: - if (!commState.putByteArray(null, resBytes)) + if (!commState.putByteArray("resBytes", resBytes)) return false; commState.idx++; @@ -178,7 +178,7 @@ public class GridTaskResultResponse extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - String err0 = commState.getString(null); + String err0 = commState.getString("err"); if (err0 == STR_NOT_READ) return false; @@ -191,7 +191,7 @@ public class GridTaskResultResponse extends GridTcpCommunicationMessageAdapter { if (buf.remaining() < 1) return false; - finished = commState.getBoolean(null); + finished = commState.getBoolean("finished"); commState.idx++; @@ -199,12 +199,12 @@ public class GridTaskResultResponse extends GridTcpCommunicationMessageAdapter { if (buf.remaining() < 1) return false; - found = commState.getBoolean(null); + found = commState.getBoolean("found"); commState.idx++; case 3: - byte[] resBytes0 = commState.getByteArray(null); + byte[] resBytes0 = commState.getByteArray("resBytes"); if (resBytes0 == BYTE_ARR_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMemcachedMessageWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMemcachedMessageWrapper.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMemcachedMessageWrapper.java index 077aa93..4aebe54 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMemcachedMessageWrapper.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/rest/protocols/tcp/GridMemcachedMessageWrapper.java @@ -66,7 +66,7 @@ public class GridMemcachedMessageWrapper extends GridTcpCommunicationMessageAdap switch (commState.idx) { case 0: - if (!commState.putByteArray(null, bytes)) + if (!commState.putByteArray("bytes", bytes)) return false; commState.idx++; @@ -78,7 +78,22 @@ public class GridMemcachedMessageWrapper extends GridTcpCommunicationMessageAdap /** {@inheritDoc} */ @Override public boolean readFrom(ByteBuffer buf) { - throw new UnsupportedOperationException(); + commState.setBuffer(buf); + + switch (commState.idx) { + case 0: + byte[] bytes0 = commState.getByteArray("bytes"); + + if (bytes0 == BYTE_ARR_NOT_READ) + return false; + + bytes = bytes0; + + commState.idx++; + + } + + return true; } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerCancelRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerCancelRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerCancelRequest.java index cc56dc8..358b7a4 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerCancelRequest.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerCancelRequest.java @@ -77,7 +77,7 @@ public class GridStreamerCancelRequest extends GridTcpCommunicationMessageAdapte switch (commState.idx) { case 0: - if (!commState.putGridUuid(null, cancelledFutId)) + if (!commState.putGridUuid("cancelledFutId", cancelledFutId)) return false; commState.idx++; @@ -94,7 +94,7 @@ public class GridStreamerCancelRequest extends GridTcpCommunicationMessageAdapte switch (commState.idx) { case 0: - IgniteUuid cancelledFutId0 = commState.getGridUuid(null); + IgniteUuid cancelledFutId0 = commState.getGridUuid("cancelledFutId"); if (cancelledFutId0 == GRID_UUID_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerExecutionRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerExecutionRequest.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerExecutionRequest.java index 39c8cf2..be546c6 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerExecutionRequest.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerExecutionRequest.java @@ -178,25 +178,25 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda switch (commState.idx) { case 0: - if (!commState.putByteArray(null, batchBytes)) + if (!commState.putByteArray("batchBytes", batchBytes)) return false; commState.idx++; case 1: - if (!commState.putGridUuid(null, clsLdrId)) + if (!commState.putGridUuid("clsLdrId", clsLdrId)) return false; commState.idx++; case 2: - if (!commState.putEnum(null, depMode)) + if (!commState.putEnum("depMode", depMode)) return false; commState.idx++; case 3: - if (!commState.putBoolean(null, forceLocDep)) + if (!commState.putBoolean("forceLocDep", forceLocDep)) return false; commState.idx++; @@ -240,13 +240,13 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda commState.idx++; case 5: - if (!commState.putString(null, sampleClsName)) + if (!commState.putString("sampleClsName", sampleClsName)) return false; commState.idx++; case 6: - if (!commState.putString(null, userVer)) + if (!commState.putString("userVer", userVer)) return false; commState.idx++; @@ -263,7 +263,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda switch (commState.idx) { case 0: - byte[] batchBytes0 = commState.getByteArray(null); + byte[] batchBytes0 = commState.getByteArray("batchBytes"); if (batchBytes0 == BYTE_ARR_NOT_READ) return false; @@ -273,7 +273,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda commState.idx++; case 1: - IgniteUuid clsLdrId0 = commState.getGridUuid(null); + IgniteUuid clsLdrId0 = commState.getGridUuid("clsLdrId"); if (clsLdrId0 == GRID_UUID_NOT_READ) return false; @@ -286,7 +286,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda if (buf.remaining() < 1) return false; - byte depMode0 = commState.getByte(null); + byte depMode0 = commState.getByte("depMode"); depMode = IgniteDeploymentMode.fromOrdinal(depMode0); @@ -296,7 +296,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda if (buf.remaining() < 1) return false; - forceLocDep = commState.getBoolean(null); + forceLocDep = commState.getBoolean("forceLocDep"); commState.idx++; @@ -310,7 +310,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda if (commState.readSize >= 0) { if (ldrParticipants == null) - ldrParticipants = U.newHashMap(commState.readSize); + ldrParticipants = new HashMap<>(commState.readSize, 1.0f); for (int i = commState.readItems; i < commState.readSize; i++) { if (!commState.keyDone) { @@ -343,7 +343,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda commState.idx++; case 5: - String sampleClsName0 = commState.getString(null); + String sampleClsName0 = commState.getString("sampleClsName"); if (sampleClsName0 == STR_NOT_READ) return false; @@ -353,7 +353,7 @@ public class GridStreamerExecutionRequest extends GridTcpCommunicationMessageAda commState.idx++; case 6: - String userVer0 = commState.getString(null); + String userVer0 = commState.getString("userVer"); if (userVer0 == STR_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerResponse.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerResponse.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerResponse.java index fc3cfcb..bfaeb09 100644 --- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerResponse.java +++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/streamer/GridStreamerResponse.java @@ -98,13 +98,13 @@ public class GridStreamerResponse extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - if (!commState.putByteArray(null, errBytes)) + if (!commState.putByteArray("errBytes", errBytes)) return false; commState.idx++; case 1: - if (!commState.putGridUuid(null, futId)) + if (!commState.putGridUuid("futId", futId)) return false; commState.idx++; @@ -121,7 +121,7 @@ public class GridStreamerResponse extends GridTcpCommunicationMessageAdapter { switch (commState.idx) { case 0: - byte[] errBytes0 = commState.getByteArray(null); + byte[] errBytes0 = commState.getByteArray("errBytes"); if (errBytes0 == BYTE_ARR_NOT_READ) return false; @@ -131,7 +131,7 @@ public class GridStreamerResponse extends GridTcpCommunicationMessageAdapter { commState.idx++; case 1: - IgniteUuid futId0 = commState.getGridUuid(null); + IgniteUuid futId0 = commState.getGridUuid("futId"); if (futId0 == GRID_UUID_NOT_READ) return false; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f5b3f26e/modules/core/src/main/java/org/gridgain/grid/util/direct/GridTcpCommunicationMessageState.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/gridgain/grid/util/direct/GridTcpCommunicationMessageState.java b/modules/core/src/main/java/org/gridgain/grid/util/direct/GridTcpCommunicationMessageState.java index 0a3f856..1fa6a8d 100644 --- a/modules/core/src/main/java/org/gridgain/grid/util/direct/GridTcpCommunicationMessageState.java +++ b/modules/core/src/main/java/org/gridgain/grid/util/direct/GridTcpCommunicationMessageState.java @@ -265,6 +265,9 @@ public class GridTcpCommunicationMessageState { writer.writeByteArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -311,6 +314,9 @@ public class GridTcpCommunicationMessageState { writer.writeShortArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -357,6 +363,9 @@ public class GridTcpCommunicationMessageState { writer.writeIntArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -403,6 +412,9 @@ public class GridTcpCommunicationMessageState { writer.writeLongArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -449,6 +461,9 @@ public class GridTcpCommunicationMessageState { writer.writeFloatArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -495,6 +510,9 @@ public class GridTcpCommunicationMessageState { writer.writeDoubleArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -541,6 +559,9 @@ public class GridTcpCommunicationMessageState { writer.writeCharArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -587,6 +608,9 @@ public class GridTcpCommunicationMessageState { writer.writeBooleanArray(name, arr); + if (arr == null) + return true; + hdrDone = true; } else @@ -1055,6 +1079,9 @@ public class GridTcpCommunicationMessageState { writer.writeObject(name, msg); + if (msg == null) + return true; + hdrDone = true; } else