kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-1884; Add logging upon metadata response errors; reviewed by Guozhang Wang
Date Thu, 07 May 2015 22:48:59 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 944628b0f -> 31dadf024


KAFKA-1884; Add logging upon metadata response errors; reviewed by Guozhang Wang


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/31dadf02
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/31dadf02
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/31dadf02

Branch: refs/heads/trunk
Commit: 31dadf0242e2c4884035f9da1b67d2e916e33743
Parents: 944628b
Author: Manikumar Reddy <manikumar.reddy@gmail.com>
Authored: Thu May 7 15:48:40 2015 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu May 7 15:48:40 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/kafka/clients/NetworkClient.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/31dadf02/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java b/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
index b7ae595..435fbb5 100644
--- a/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
+++ b/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
@@ -391,6 +391,10 @@ public class NetworkClient implements KafkaClient {
         this.metadataFetchInProgress = false;
         MetadataResponse response = new MetadataResponse(body);
         Cluster cluster = response.cluster();
+        // check if any topics metadata failed to get updated
+        if (response.errors().size() > 0) {
+            log.warn("Error while fetching metadata with correlation id {} : {}", header.correlationId(),
response.errors());
+        }
         // don't update the cluster if there are no valid nodes...the topic we want may still
be in the process of being
         // created which means we will get errors and no nodes until it exists
         if (cluster.nodes().size() > 0) {


Mime
View raw message