...
Code Block |
---|
usage: kafka-storage format [-h] --config CONFIG --cluster-id CLUSTER_ID [--metadata-version VERSION] [--ignore-formatted] optional arguments: -h, --help show this help message and exit --config CONFIG, -c CONFIG The Kafka configuration file to use. --cluster-id CLUSTER_ID, -t CLUSTER_ID The cluster ID to use. --metadata-version VERSION The initial value for metadata.version feature flag. --ignore-formatted, -g |
AdminClient changes
To support the three possible downgrade types, we will add an enum and a new constructor to org.apache.kafka.clients.admin.FeatureUpdate
Code Block |
---|
public class FeatureUpdate {
private final short maxVersionLevel;
private final DowngradeType downgradeType;
@Deprecated // Keep this constructor for backwards compatibility
public FeatureUpdate(final short maxVersionLevel, final boolean allowDowngrade) {
this(maxVersionLevel, DowngradeType.SAFE);
}
public FeatureUpdate(final short maxVersionLevel, final DowngradeType downgradeType) {
this.maxVersionLevel = maxVersionLevel;
this.downgradeType = downgradeType;
}
public short maxVersionLevel() {
return maxVersionLevel;
}
@Deprecated
public boolean allowDowngrade() {
return downgradeType == DowngradeType.SAFE;
}
public DowngradeType downgradeType() {
return downgradeType;
}
public enum DowngradeType {
NONE, SAFE, UNSAFE;
}
} |
We will also add a DryRun boolean to UpdateFeaturesOptions with a default no-arg constructor setting the boolean to false.
Proposed Changes
Overview
The sections below go into more detail, but the overall workflow of an upgrade is:
...