Return-Path: X-Original-To: apmail-kafka-commits-archive@www.apache.org Delivered-To: apmail-kafka-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCF46173F4 for ; Thu, 7 May 2015 22:48:59 +0000 (UTC) Received: (qmail 44939 invoked by uid 500); 7 May 2015 22:48:59 -0000 Delivered-To: apmail-kafka-commits-archive@kafka.apache.org Received: (qmail 44910 invoked by uid 500); 7 May 2015 22:48:59 -0000 Mailing-List: contact commits-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list commits@kafka.apache.org Received: (qmail 44901 invoked by uid 99); 7 May 2015 22:48:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2015 22:48:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 50D42E443B; Thu, 7 May 2015 22:48:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: guozhang@apache.org To: commits@kafka.apache.org Message-Id: <0a766743d0d0416ba8eee30470d3f3a1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: kafka git commit: KAFKA-1884; Add logging upon metadata response errors; reviewed by Guozhang Wang Date: Thu, 7 May 2015 22:48:59 +0000 (UTC) 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 Authored: Thu May 7 15:48:40 2015 -0700 Committer: Guozhang Wang 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) {