kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: Improve exception message that gets thrown for non-existent group
Date Mon, 09 Nov 2015 21:42:09 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 2e20898db -> a8b263c5f


MINOR: Improve exception message that gets thrown for non-existent group

Author: Ashish Singh <asingh@cloudera.com>

Reviewers: Guozhang Wang

Closes #471 from SinghAsDev/ExceptionMessage

(cherry picked from commit 3ebb4ee1b0803b755eaefc3286fe107868b7b085)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.9.0
Commit: a8b263c5fbf6edd11fe15d7a05c6efb9d9a63aee
Parents: 2e20898
Author: Ashish Singh <asingh@cloudera.com>
Authored: Mon Nov 9 13:47:55 2015 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Mon Nov 9 13:48:06 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/admin/AdminClient.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a8b263c5/core/src/main/scala/kafka/admin/AdminClient.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/AdminClient.scala b/core/src/main/scala/kafka/admin/AdminClient.scala
index 4618127..28f3cda 100644
--- a/core/src/main/scala/kafka/admin/AdminClient.scala
+++ b/core/src/main/scala/kafka/admin/AdminClient.scala
@@ -156,7 +156,7 @@ class AdminClient(val time: Time,
   def describeConsumerGroup(groupId: String): List[ConsumerSummary] = {
     val group = describeGroup(groupId)
     if (group.protocolType != ConsumerProtocol.PROTOCOL_TYPE)
-      throw new IllegalArgumentException(s"${group} is not a valid GroupSummary")
+      throw new IllegalArgumentException(s"Group ${groupId} is not a valid kafka consumer
group but belongs to ${if (!group.protocolType.isEmpty) group.protocolType else "not exist"}")
 
     group.members.map {
       case member =>


Mime
View raw message