You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2015/06/01 19:38:10 UTC
[35/50] storm git commit: STORM-835 Netty Client hold batch object
until io operation complete
STORM-835 Netty Client hold batch object until io operation complete
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/f3d5aca8
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/f3d5aca8
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/f3d5aca8
Branch: refs/heads/0.10.x-branch
Commit: f3d5aca8c6eaf3057abe43dccea42b509de70987
Parents: 106af61
Author: zhanghailei <zh...@youku.com>
Authored: Mon May 25 10:00:12 2015 +0800
Committer: zhanghailei <zh...@youku.com>
Committed: Mon May 25 10:00:12 2015 +0800
----------------------------------------------------------------------
storm-core/src/jvm/backtype/storm/messaging/netty/Client.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/f3d5aca8/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
index f332bb3..ac3f3f2 100644
--- a/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
+++ b/storm-core/src/jvm/backtype/storm/messaging/netty/Client.java
@@ -461,7 +461,7 @@ public class Client extends ConnectionWithStatus implements IStatefulObject {
*
* If the write operation fails, then we will close the channel and trigger a reconnect.
*/
- private synchronized void flushMessages(Channel channel, final MessageBatch batch) {
+ private synchronized void flushMessages(Channel channel, MessageBatch batch) {
if (!containsMessages(batch)) {
return;
}
@@ -476,7 +476,7 @@ public class Client extends ConnectionWithStatus implements IStatefulObject {
pendingMessages.getAndAdd(0 - numMessages);
if (future.isSuccess()) {
LOG.debug("sent {} messages to {}", numMessages, dstAddressPrefixedName);
- messagesSent.getAndAdd(batch.size());
+ messagesSent.getAndAdd(numMessages);
}
else {
LOG.error("failed to send {} messages to {}: {}", numMessages, dstAddressPrefixedName,