cmccabe commented on a change in pull request #8610:
URL: https://github.com/apache/kafka/pull/8610#discussion_r419794980



##########
File path: core/src/main/scala/kafka/admin/ConfigCommand.scala
##########
@@ -473,10 +474,11 @@ object ConfigCommand extends Config {
   }
 
   private def describeClientQuotasConfig(adminClient: Admin, entityTypes: 
List[String], entityNames: List[String]) = {
+    warn(s"entityNames = $entityNames")
     getAllClientQuotasConfigs(adminClient, entityTypes, entityNames).foreach { 
case (entity, entries) =>
       val entityEntries = entity.entries.asScala
-      val entityStr = (entityEntries.get(ClientQuotaEntity.USER).map(u => 
s"user-principal '${u}'") ++
-        entityEntries.get(ClientQuotaEntity.CLIENT_ID).map(c => s"client-id 
'${c}'")).mkString(", ")
+      val entityStr = (entityEntries.get(ClientQuotaEntity.USER).map(u => 
s"user-principal '${Option(u).filterNot(_.isEmpty).getOrElse("default")}'") ++

Review comment:
       this is clever, but I'd really rather have a simple `if (u.isEmpty) 
"default" else u`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to