DL1231 commented on code in PR #20248:
URL: https://github.com/apache/kafka/pull/20248#discussion_r2366555366
##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -184,18 +180,20 @@ object StorageTool extends Logging {
* 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.
- * @param validFeatures List of features to be considered in the output
+ * @param namespace Arguments containing the release
version.
+ * @param printStream The print stream to output the
version mapping.
+ * @param validFeatures List of features to be considered in
the output.
+ * @param unstableFeatureVersionsEnable Whether unreleased MetadataVersions
should be enabled or not.
*/
def runVersionMappingCommand(
namespace: Namespace,
printStream: PrintStream,
- validFeatures: java.util.List[Feature]
+ validFeatures: java.util.List[Feature],
+ unstableFeatureVersionsEnable: Boolean
): Unit = {
val releaseVersion =
Option(namespace.getString("release_version")).getOrElse(MetadataVersion.LATEST_PRODUCTION.toString)
try {
- val metadataVersion = MetadataVersion.fromVersionString(releaseVersion)
+ val metadataVersion = MetadataVersion.fromVersionString(releaseVersion,
unstableFeatureVersionsEnable)
Review Comment:
> Oh, looks like this function does have any docs yet. Mind adding them in
the follow-up?
Okay, I will open a follow-up for adding them.
##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -184,18 +180,20 @@ object StorageTool extends Logging {
* 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.
- * @param validFeatures List of features to be considered in the output
+ * @param namespace Arguments containing the release
version.
+ * @param printStream The print stream to output the
version mapping.
+ * @param validFeatures List of features to be considered in
the output.
+ * @param unstableFeatureVersionsEnable Whether unreleased MetadataVersions
should be enabled or not.
*/
def runVersionMappingCommand(
namespace: Namespace,
printStream: PrintStream,
- validFeatures: java.util.List[Feature]
+ validFeatures: java.util.List[Feature],
+ unstableFeatureVersionsEnable: Boolean
): Unit = {
val releaseVersion =
Option(namespace.getString("release_version")).getOrElse(MetadataVersion.LATEST_PRODUCTION.toString)
try {
- val metadataVersion = MetadataVersion.fromVersionString(releaseVersion)
+ val metadataVersion = MetadataVersion.fromVersionString(releaseVersion,
unstableFeatureVersionsEnable)
Review Comment:
> This function prints features based on the MV, It should support all MVs,
correct?
Yes, thanks for pointing that out.
##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -184,18 +180,20 @@ object StorageTool extends Logging {
* 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.
- * @param validFeatures List of features to be considered in the output
+ * @param namespace Arguments containing the release
version.
+ * @param printStream The print stream to output the
version mapping.
+ * @param validFeatures List of features to be considered in
the output.
+ * @param unstableFeatureVersionsEnable Whether unreleased MetadataVersions
should be enabled or not.
*/
def runVersionMappingCommand(
namespace: Namespace,
printStream: PrintStream,
- validFeatures: java.util.List[Feature]
+ validFeatures: java.util.List[Feature],
+ unstableFeatureVersionsEnable: Boolean
): Unit = {
val releaseVersion =
Option(namespace.getString("release_version")).getOrElse(MetadataVersion.LATEST_PRODUCTION.toString)
try {
- val metadataVersion = MetadataVersion.fromVersionString(releaseVersion)
+ val metadataVersion = MetadataVersion.fromVersionString(releaseVersion,
unstableFeatureVersionsEnable)
Review Comment:
> Oh, looks like this function does have any docs yet. Mind adding them in
the follow-up?
Okay, I will open a follow-up for adding them.
--
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]