[ https://issues.apache.org/jira/browse/KAFKA-10175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vikas Singh updated KAFKA-10175: -------------------------------- Description: This line in the code always returns null: [[MetadataCache|https://github.com/apache/kafka/blob/2.6/core/src/main/scala/kafka/server/MetadataCache.scala#L272]::getClusterMetadata|[https://github.com/apache/kafka/blob/2.6/core/src/main/scala/kafka/server/MetadataCache.scala#L272]] The reason is that the `map(node)` part uses `aliveNodes` to create `Node` object otherwise default to `null`. Offline replicas thus end up always as null. was: This line in the code always returns null: > https://github.com/apache/kafka/blob/2.6/core/src/main/scala/kafka/server/MetadataCache.scala#L272 The reason is that the `map(node)` part uses `aliveNodes` to create `Node` object otherwise default to `null`. Offline replicas thus end up always as null. > MetadataCache::getCluster returns null for offline replicas > ----------------------------------------------------------- > > Key: KAFKA-10175 > URL: https://issues.apache.org/jira/browse/KAFKA-10175 > Project: Kafka > Issue Type: Bug > Reporter: Vikas Singh > Priority: Major > > This line in the code always returns null: > [[MetadataCache|https://github.com/apache/kafka/blob/2.6/core/src/main/scala/kafka/server/MetadataCache.scala#L272]::getClusterMetadata|[https://github.com/apache/kafka/blob/2.6/core/src/main/scala/kafka/server/MetadataCache.scala#L272]] > The reason is that the `map(node)` part uses `aliveNodes` to create `Node` > object otherwise default to `null`. Offline replicas thus end up always as > null. -- This message was sent by Atlassian Jira (v8.3.4#803005)