Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9695

AdminClient allows null topic configs, but broker throws NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Config entries may contain null values, but broker's AdminManager throws NPE resulting in UnknownServerException. We should handle null values in configs.

      [2020-03-10 21:56:07,904] ERROR [Admin Manager on Broker 0]: Error processing create topic request CreatableTopic(name='topic', numPartitions=2, replicationFactor=3, assignments=[], configs=[CreateableTopicConfig(name='message.format.version', value=null), CreateableTopicConfig(name='compression.type', value='producer')]) (kafka.server.AdminManager:76)
      java.lang.NullPointerException
      	at java.util.Hashtable.put(Hashtable.java:460)
      	at java.util.Properties.setProperty(Properties.java:166)
      	at kafka.server.AdminManager.$anonfun$createTopics$3(AdminManager.scala:99)
      	at scala.collection.Iterator.foreach(Iterator.scala:941)
      	at scala.collection.Iterator.foreach$(Iterator.scala:941)
      	at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
      	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
      	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
      	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
      	at kafka.server.AdminManager.$anonfun$createTopics$2(AdminManager.scala:98)
      	at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
      	at scala.collection.mutable.HashMap$$anon$2.$anonfun$foreach$3(HashMap.scala:158)
      	at scala.collection.mutable.HashTable.foreachEntry(HashTable.scala:237)
      	at scala.collection.mutable.HashTable.foreachEntry$(HashTable.scala:230)
      	at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:44)
      	at scala.collection.mutable.HashMap$$anon$2.foreach(HashMap.scala:158)
      	at scala.collection.TraversableLike.map(TraversableLike.scala:238)
      	at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
      	at scala.collection.AbstractTraversable.map(Traversable.scala:108)
      	at kafka.server.AdminManager.createTopics(AdminManager.scala:91)
      	at kafka.server.KafkaApis.handleCreateTopicsRequest(KafkaApis.scala:1701)
      	at kafka.server.KafkaApis.handle(KafkaApis.scala:147)
      	at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:70)
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rsivaram Rajini Sivaram
                Reporter:
                rsivaram Rajini Sivaram
                Reviewer:
                Manikumar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: