rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongefore...@apache.org
Subject [17/51] [abbrv] incubator-rocketmq git commit: [ROCKETMQ-172]log improvement for rocketmq client closes apache/incubator-rocketmq#90
Date Tue, 06 Jun 2017 03:38:37 GMT
[ROCKETMQ-172]log improvement for rocketmq client closes apache/incubator-rocketmq#90


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

Branch: refs/heads/master
Commit: 15c2b55ace26de6c98e0c5c26477556922a29451
Parents: 051527d
Author: Jaskey <linjunjie1103@gmail.com>
Authored: Mon Apr 17 19:28:26 2017 +0800
Committer: dongeforever <zhendongliu92@yeah.net>
Committed: Tue Jun 6 11:37:29 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java  | 6 +++---
 .../apache/rocketmq/client/impl/factory/MQClientInstance.java  | 2 +-
 .../apache/rocketmq/remoting/netty/NettyRemotingClient.java    | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/15c2b55a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
index 6119e24..ff25334 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
@@ -593,12 +593,12 @@ public class MQClientAPIImpl {
                     }
                 } else {
                     if (!responseFuture.isSendRequestOK()) {
-                        pullCallback.onException(new MQClientException("send request failed",
responseFuture.getCause()));
+                        pullCallback.onException(new MQClientException("send request failed
to " + addr + ". Request: " + request, responseFuture.getCause()));
                     } else if (responseFuture.isTimeout()) {
-                        pullCallback.onException(new MQClientException("wait response timeout
" + responseFuture.getTimeoutMillis() + "ms",
+                        pullCallback.onException(new MQClientException("wait response from
" + addr + " timeout :" + responseFuture.getTimeoutMillis() + "ms" + ". Request: " + request,
                             responseFuture.getCause()));
                     } else {
-                        pullCallback.onException(new MQClientException("unknow reseaon",
responseFuture.getCause()));
+                        pullCallback.onException(new MQClientException("unknown reason. addr:
" + addr + ", timeoutMillis: " + timeoutMillis + ". Request: " + request, responseFuture.getCause()));
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/15c2b55a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
index 11266c4..d7e02fe 100644
--- a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
+++ b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java
@@ -596,7 +596,7 @@ public class MQClientInstance {
                                     }
                                 }
                             }
-                            log.info("topicRouteTable.put TopicRouteData[{}]", cloneTopicRouteData);
+                            log.info("topicRouteTable.put. Topic = {}, TopicRouteData[{}]",
topic, cloneTopicRouteData);
                             this.topicRouteTable.put(topic, cloneTopicRouteData);
                             return true;
                         }

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/15c2b55a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
----------------------------------------------------------------------
diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
index 85f9244..26088aa 100644
--- a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
+++ b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java
@@ -321,6 +321,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements
Remoti
 
             if (update) {
                 Collections.shuffle(addrs);
+                log.info("name server address updated. NEW : {} , OLD: {}",addrs,old);
                 this.namesrvAddrList.set(addrs);
             }
         }
@@ -398,6 +399,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements
Remoti
                         String newAddr = addrList.get(index);
 
                         this.namesrvAddrChoosed.set(newAddr);
+                        log.info("new name server is chosen. OLD: {} , NEW: {}. namesrvIndex
= {}", addr, newAddr, namesrvIndex);
                         Channel channelNew = this.createChannel(newAddr);
                         if (channelNew != null)
                             return channelNew;


Mime
View raw message