Skip to content

Commit 07b786e

Browse files
authored
KAFKA-19681 Improve MetadataShell tool by skipping missing children and removing zkMigrationState (#20504)
The current `metadata-shell` find command throws an exception due to child node `zkMigrationState`. This interrupts the output and makes the CLI less usable. Additionally, `zkMigrationState` is no longer used in Kafka 4.x, but it is still defined under image/features, which causes misleading error messages. Reviewers: Chia-Ping Tsai <[email protected]>
1 parent 5919762 commit 07b786e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

metadata/src/main/java/org/apache/kafka/image/node/FeaturesImageNode.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ public class FeaturesImageNode implements MetadataNode {
3434
*/
3535
public static final String METADATA_VERSION = "metadataVersion";
3636

37-
/**
38-
* The name of the zk migration state child node.
39-
*/
40-
public static final String ZK_MIGRATION_STATE = "zkMigrationState";
41-
4237
/**
4338
* The prefix to put before finalized feature children.
4439
*/
@@ -57,7 +52,6 @@ public FeaturesImageNode(FeaturesImage image) {
5752
public Collection<String> childNames() {
5853
ArrayList<String> childNames = new ArrayList<>();
5954
childNames.add(METADATA_VERSION);
60-
childNames.add(ZK_MIGRATION_STATE);
6155
for (String featureName : image.finalizedVersions().keySet()) {
6256
childNames.add(FINALIZED_PREFIX + featureName);
6357
}

0 commit comments

Comments
 (0)