chia7712 commented on code in PR #21072:
URL: https://github.com/apache/kafka/pull/21072#discussion_r2587665873
##########
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:
Is there a way to align these console outputs based on tab?
--
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]