mirror of https://github.com/apache/kafka.git
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 <chia7712@gmail.com>
This commit is contained in:
parent
5919762009
commit
07b786e5bf
|
@ -34,11 +34,6 @@ public class FeaturesImageNode implements MetadataNode {
|
|||
*/
|
||||
public static final String METADATA_VERSION = "metadataVersion";
|
||||
|
||||
/**
|
||||
* The name of the zk migration state child node.
|
||||
*/
|
||||
public static final String ZK_MIGRATION_STATE = "zkMigrationState";
|
||||
|
||||
/**
|
||||
* The prefix to put before finalized feature children.
|
||||
*/
|
||||
|
@ -57,7 +52,6 @@ public class FeaturesImageNode implements MetadataNode {
|
|||
public Collection<String> childNames() {
|
||||
ArrayList<String> childNames = new ArrayList<>();
|
||||
childNames.add(METADATA_VERSION);
|
||||
childNames.add(ZK_MIGRATION_STATE);
|
||||
for (String featureName : image.finalizedVersions().keySet()) {
|
||||
childNames.add(FINALIZED_PREFIX + featureName);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue