-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-16308 [1/N]: Create FeatureVersion interface and add --feature flag and handling to StorageTool
#15685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
96de66e
8f7bc87
ccb7a50
b4e2e21
a31a71e
92b7326
0b0b9ab
70163cb
940653a
50ee633
7f162b8
db0b9a0
830a637
0dcada4
3988422
4e76ba4
1ca5112
f55811f
435808a
13a8840
5fc9fea
4e1989a
1a43f18
d86ff02
1d3fab8
e325a88
b56707b
2416e95
1a474ef
a28ece3
5f1ac97
24e14ed
00b63ad
0704b61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ package kafka.server | |
|
|
||
| import kafka.utils.Logging | ||
| import org.apache.kafka.common.feature.{Features, SupportedVersionRange} | ||
| import org.apache.kafka.server.common.Features.PRODUCTION_FEATURES | ||
| import org.apache.kafka.server.common.MetadataVersion | ||
|
|
||
| import java.util | ||
|
|
@@ -75,16 +76,19 @@ object BrokerFeatures extends Logging { | |
| } | ||
|
|
||
| def defaultSupportedFeatures(unstableMetadataVersionsEnabled: Boolean): Features[SupportedVersionRange] = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add a unit test for this change?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can look into adding something. The problem is I don't add any new production features in this change. I would add one in the next PR. |
||
| Features.supportedFeatures( | ||
| java.util.Collections.singletonMap(MetadataVersion.FEATURE_NAME, | ||
| val features = new util.HashMap[String, SupportedVersionRange]() | ||
| features.put(MetadataVersion.FEATURE_NAME, | ||
| new SupportedVersionRange( | ||
| MetadataVersion.MINIMUM_KRAFT_VERSION.featureLevel(), | ||
| if (unstableMetadataVersionsEnabled) { | ||
| MetadataVersion.latestTesting.featureLevel | ||
| } else { | ||
| MetadataVersion.latestProduction.featureLevel | ||
| } | ||
| ))) | ||
| })) | ||
| PRODUCTION_FEATURES.forEach { feature => | ||
| features.put(feature.featureName, new SupportedVersionRange(0, feature.latestProduction())) | ||
| } | ||
| Features.supportedFeatures(features) | ||
| } | ||
|
|
||
| def createEmpty(): BrokerFeatures = { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.