rreddy-22 commented on code in PR #16973:
URL: https://github.com/apache/kafka/pull/16973#discussion_r1735207580
##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -134,6 +138,35 @@ object StorageTool extends Logging {
formatter.run()
}
+ /**
+ * Maps the given release version to the corresponding metadata version
+ * and prints the corresponding features.
+ *
+ * @param namespace Arguments containing the release version.
+ * @param printStream The print stream to output the version mapping.
+ */
+ def runVersionMappingCommand(
+ namespace: Namespace,
+ printStream: PrintStream
+ ): Unit = {
+ val releaseVersion =
Option(namespace.getString("release_version")).getOrElse(MetadataVersion.LATEST_PRODUCTION.toString)
+ try {
+ val metadataVersion = MetadataVersion.fromVersionString(releaseVersion)
+
+ val metadataVersionLevel = metadataVersion.featureLevel()
+ printStream.printf("metadata.version=%d (%s) ", metadataVersionLevel,
releaseVersion)
+
+ for (feature <- Features.values()) {
+ val featureLevel = feature.defaultValue(metadataVersion)
+ printStream.printf("%s=%d ", feature.featureName, featureLevel)
Review Comment:
yep sure!
--
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]