rionmonster commented on code in PR #21072:
URL: https://github.com/apache/kafka/pull/21072#discussion_r2589080661


##########
tools/src/main/java/org/apache/kafka/tools/FeatureCommand.java:
##########
@@ -228,20 +223,12 @@ static String levelToString(String feature, short level) {
         return String.valueOf(level);
     }
 
-    static void handleDescribe(Namespace namespace, Admin adminClient) throws 
ExecutionException, InterruptedException {
-        DescribeFeaturesOptions describeFeaturesOptions = new 
DescribeFeaturesOptions();
-        if (namespace.getInt("node_id") != null) {
-            int nodeId = namespace.getInt("node_id");
-            if (nodeId < 0) {
-                throw new IllegalArgumentException("Invalid node id " + nodeId 
+ ": must be non-negative.");
-            }
-            describeFeaturesOptions = 
describeFeaturesOptions.nodeId(namespace.getInt("node_id"));
-        }
-        FeatureMetadata featureMetadata = 
adminClient.describeFeatures(describeFeaturesOptions).featureMetadata().get();
+    static void handleDescribe(Admin adminClient) throws ExecutionException, 
InterruptedException {
+        FeatureMetadata featureMetadata = 
adminClient.describeFeatures().featureMetadata().get();
         
featureMetadata.supportedFeatures().keySet().stream().sorted().forEach(feature 
-> {
             short finalizedLevel = 
(featureMetadata.finalizedFeatures().get(feature) == null) ? 0 : 
featureMetadata.finalizedFeatures().get(feature).maxVersionLevel();
             SupportedVersionRange range = 
featureMetadata.supportedFeatures().get(feature);
-            System.out.printf("Feature: %s\tSupportedMinVersion: 
%s\tSupportedMaxVersion: %s\tFinalizedVersionLevel: %s\tEpoch: %s%n",
+            System.out.printf("Feature: %s\t\tSupportedMinVersion: 
%s\t\tSupportedMaxVersion: %s\t\tFinalizedVersionLevel: %s\t\tEpoch: %s%n",

Review Comment:
   Totally -- we could introduce fixed width fields to handle the formatting 
(instead of tabs) which would make it more consistent as seen below:
   
   <img width="1381" height="163" alt="image" 
src="https://github.com/user-attachments/assets/f86a9586-7511-4cdd-ba25-369899ee44f3";
 />
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to