storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [40/50] [abbrv] git commit: STORM-297: avoid call IConneciton.send() when there is no message in the iterator.
Date Wed, 11 Jun 2014 16:10:12 GMT
STORM-297: avoid call IConneciton.send() when there is no message in the iterator.


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

Branch: refs/heads/security
Commit: b4422f13b6c609b5f68eb0a053f4bc08182f97d5
Parents: f6915d4
Author: Sean Zhong <clockfly@gmail.com>
Authored: Sun Jun 8 01:03:05 2014 +0800
Committer: Sean Zhong <clockfly@gmail.com>
Committed: Sun Jun 8 01:03:05 2014 +0800

----------------------------------------------------------------------
 storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/b4422f13/storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java b/storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java
index c9f1b04..0e53632 100644
--- a/storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java
+++ b/storm-core/src/jvm/backtype/storm/utils/TransferDrainer.java
@@ -50,7 +50,7 @@ public class TransferDrainer {
       if (null != connection) { 
         ArrayList<ArrayList<TaskMessage>> bundle = bundles.get(hostPort);
         Iterator<TaskMessage> iter = getBundleIterator(bundle);
-        if (null != iter) {
+        if (null != iter && iter.hasNext()) {
           connection.send(iter);
         }
       }


Mime
View raw message