Package io.strimzi.api.kafka.model.kafka
Enum KafkaMetadataState
- All Implemented Interfaces:
Serializable,Comparable<KafkaMetadataState>
Represents where metadata are stored for the current cluster (ZooKeeper or KRaft)
or if a migration from ZooKeeper to KRaft is in progress and in which phase
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe metadata are stored in KRaft.The cluster is working in "dual write" mode.Pre-migration phase is running and migration is going to start.There is a post-migration phase running.The matadata are stored in KRaft.The metadata are stored in ZooKeeper. -
Method Summary
Modifier and TypeMethodDescriptionstatic KafkaMetadataStatetoValue()static KafkaMetadataStateReturns the enum constant of this type with the specified name.static KafkaMetadataState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ZooKeeper
The metadata are stored in ZooKeeper. The strimzi.io/kraft: disabled annotation is set on the Kafka resource. Waiting for the user to create the controllers pool and start the migration. Transitions to:- ZooKeeper
- If the user hasn't created the controller node pool yet or set the strimzi.io/kraft: migration annotation, or set it to invalid value (e.g. enabled or rollback)
- KRaftMigration
- If user has created the controller node pool and set the strimzi.io/kraft: migration annotation. The controllers are deployed with ZooKeeper migration enabled and connection to it.
-
KRaftMigration
Pre-migration phase is running and migration is going to start. The KRaft controllers were rolled and are now running with ZooKeeper migration enabled, and they are connected to it. Next expected step is to roll brokers with ZooKeeper migration enabled and connection information to controllers configured. Unless user wants to rollback. After rolling brokers, the metadata migration starts. This state represents when it is in progress as well. A first reconcile on this state would roll the brokers, next reconciliations will be used to check the migration status on corresponding metrics. Transitions to:- KRaftMigration
- If the user keeps the strimzi.io/kraft: migration annotation. The brokers are rolled with ZooKeeper migration enabled and connection information to controllers configured. It is also in this phase, when the migration is still ongoing or has invalid annotation value (enabled and rollback)
- ZooKeeper
- If the user wants to rollback and set strimzi.io/kraft: disabled annotation. The brokers are rolled back with ZooKeeper migration disabled and no connection to controllers.
- KRaftDualWriting
- Metadata migration finished. The cluster is in "dual write" mode. Metadata are written on both ZooKeeper and KRaft controllers.
-
KRaftDualWriting
The cluster is working in "dual write" mode. Metadata are written on both ZooKeeper and KRaft controllers. Next expected step is to finalize the migration and disable ZooKeeper. Transitions to:- KRaftDualWriting
- If user applies any invalid values for this state on the strimzi.io/kraft annotation (enabled or rollback)
- ZooKeeper
- If the user wants to rollback and sets strimzi.io/kraft: disabled annotation. The brokers are rolled back with ZooKeeper migration disabled and no connection to controllers.
- KRaftPostMigration
- The user keeps the strimzi.io/kraft: migration annotation. The brokers are rolled with ZooKeeper migration disabled and without connection to it anymore.
-
KRaftPostMigration
There is a post-migration phase running. The brokers were rolled and are now running with ZooKeeper migration disabled and without any connection to it anymore. Next expected step is to finalize the migration and disable ZooKeeper on controllers as well. Transitions to:- KraftDualWriting
- If user applies the strimzi.io/kraft: rollback annotation because they want to rollback to a ZooKeeper-based cluster.
- KRaftPostMigration
- If user applies any invalid values for this state on the strimzi.io/kraft annotation.
- PreKRaft
- The strimzi.io/kraft: enabled is still in place, and after brokers, the operator has rolled controllers with ZooKeeper migration disabled and no connection to it anymore. ZooKeeper pods are still running.
-
PreKRaft
The matadata are stored in KRaft. The strimzi.io/kraft: enabled annotation is set on the Kafka resource. ZooKeeper pods are still running and they will be removed during migration finalization when moving to KRaft. Transitions to:- KRaft
- The strimzi.io/kraft: enabled is still in place, and after brokers, the operator has rolled controllers with ZooKeeper migration disabled and no connection to it anymore. ZooKeeper pods are also deleted.
-
KRaft
The metadata are stored in KRaft. The strimzi.io/kraft: enabled annotation is set on the Kafka resource. Transitions to:- KRaft
- If the user sets strimzi.io/kraft: migration annotation but, of course, it's not possible because the cluster is already KRaft-based.
- KRaft
- If the user sets strimzi.io/kraft: rollback or disabled annotation which can't be used to rollback to be ZooKeeper-based from this state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forValue
-
toValue
-