Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Add version-mapping command to to look up the corresponding features for a given metadata version. Using the command with no  --release-version  argument will return the mapping for the latest stable metadata version.
  • Add dependencies command to look up dependencies for a given feature version supplied by --feature flag. If the feature is not known or the version not yet defined, throw an error. 
     

...

Code Block
bin/kafka-storage.sh version-mapping // Returns latest stable version mapping
> Feature versions for metadata.version=19 (3.7-IV4): 
> transaction.protocol.version=2
> group.coordinator.version=1

bin/kafka-storage.sh version-mapping --release-version 3.6-IV1
> Feature versions for metadata.version=13 (3.6-IV1): 
> transaction.protocol.version=0
> group.coordinator.version=0
 
bin/kafka-storage.sh version-mapping --release-version 2.9-IV2 // throws error, not a valid version

bin/kafka-features.sh version-mapping
bin/kafka-features.sh version-mapping --release-version 3.6-IV1

kafka-feature dependencies --feature transaction.protocol.version=2
> transaction.protocol.verison=2 requires metadata.version=4 (listing any other version dependencies)

kafka-feature dependencies --feature metadata.version=17
> metadata.version=17 has no dependencies

...

Code Block
bin/kafka-storage.sh format --cluster-id=123456 // Gives the cluster all the latest stable feature versions
bin/kafka-storage.sh format --release-version 3.6-IVI --cluster-id=123456 // Gives the cluster all the versions that map to 3.6-IV1
bin/kafka-storage.sh format --feature metadata.version=16 --feature transaction.protocol.version=2 --feature group.coordinator.version=1 --cluster-id=123456 // Gives the cluster metadata.version 16, transaction protocol version 2, and group coordinator version 1
bin/kafka-storage.sh format --feature metadata.version=16 --feature transaction.protocol.version=2 --release-version 3.3-IV2 --cluster-id=123456 // throws error!
bin/kafka-storage.sh format --feature transaction.protocol.version=2 --cluster-id=123456 // Given TV 2 is not known by the storage tool, throws error!
bin/kafka-storage.sh format --feature group.coordinator.version=2 --release-version 3.3-IV2 --cluster-id=123456 // Given GCP2 requires MV 3.8-IV3, throws error!
 
bin/kafka-features.sh upgrade // Sets the cluster to all the latest stable feature versions
bin/kafka-features.sh upgrade --feature transaction.protocol.version=2 // Sets the transaction protocol version to 2
bin/kafka-features.sh upgrade --feature metadata.version=16 --feature transaction.protocol.version=2 --feature group.coordinator.version=1 // Upgrades the cluster to metadata.version 16, transaction protocol version 2, and group coordinator version 1
bin/kafka-features.sh upgrade --release-version 3.6-IVI // Upgrades all the features to versions that map to 3.6-IV1
bin/kafka-features.sh downgrade --feature metadata.version=16 --feature transaction.protocol.version=2 // Throws error if metadata version is < 16, and this would be an upgrade
bin/kafka-features.sh upgrade --feature transaction.protocol.version=2  --release-version 3.6-IVI // Throws error!

...