CalvinConfluent commented on code in PR #15470:
URL: https://github.com/apache/kafka/pull/15470#discussion_r1513646133


##########
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java:
##########
@@ -2276,6 +2415,11 @@ private Node leader(PartitionInfo partitionInfo) {
         return partitionInfo.leader();
     }
 
+    // This is used in the describe topics path if using DescribeTopics API.
+    private Node replicaToFakeNode(int id) {
+        return new Node(id, "Dummy", 0);
+    }

Review Comment:
   The DescribeTopicParitions does not provide the node info as Metadata Api 
does. However the TopicPartitionInfo constructor requires the node info, but 
the node info is useless in the describeTopic scenario.



##########
tools/src/main/java/org/apache/kafka/tools/TopicCommand.java:
##########
@@ -537,6 +544,18 @@ public Map<TopicPartition, PartitionReassignment> 
listAllReassignments(Set<Topic
         }
 
         public void describeTopic(TopicCommandOptions opts) throws 
ExecutionException, InterruptedException {
+            try {
+                describeTopic(opts, true);
+            } catch (Exception e) {
+                if (e.getMessage().contains("UnsupportedVersionException")) {

Review Comment:
   Refactored.



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to