java.util.NoSuchElementException: key not found: data/kafka-logs
at scala.collection.MapLike$class.default(MapLike.scala:223)
at scala.collection.immutable.Map$Map1.default(Map.scala:93)
at scala.collection.MapLike$class.apply(MapLike.scala:134)
at scala.collection.immutable.Map$Map1.apply(Map.scala:93)
at kafka.cluster.Partition.getOrCreateReplica(Partition.scala:93)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:178)
at kafka.cluster.Partition$$anonfun$makeLeader$2.apply(Partition.scala:178)
at scala.collection.immutable.Set$Set1.foreach(Set.scala:81)
at kafka.cluster.Partition.makeLeader(Partition.scala:178)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:309)
at kafka.server.ReplicaManager$$anonfun$makeLeaders$5.apply(ReplicaManager.scala:308)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80)
at scala.collection.Iterator$class.foreach(Iterator.scala:631)
at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:161)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:194)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39)
at scala.collection.mutable.HashMap.foreach(HashMap.scala:80)
at kafka.server.ReplicaManager.makeLeaders(ReplicaManager.scala:308)
at kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.scala:260)
at kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:100)
at kafka.server.KafkaApis.handle(KafkaApis.scala:71)
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:42)
at java.lang.Thread.run(Thread.java:662)
I think we just need to update the look-up key in getOrCreateReplica with
the absolute path, but we should check if there are other accesses to the
same map which needs an update.