Enum RemotePartitionDeleteState
java.lang.Object
java.lang.Enum<RemotePartitionDeleteState>
org.apache.kafka.server.log.remote.storage.RemotePartitionDeleteState
- All Implemented Interfaces:
Serializable
,Comparable<RemotePartitionDeleteState>
,Constable
@Evolving public enum RemotePartitionDeleteState extends Enum<RemotePartitionDeleteState>
This enum indicates the deletion state of the remote topic partition. This will be based on the action executed on this
partition by the remote log service implementation.
State transitions are mentioned below. Self transition is treated as valid. This allows updating with the
same state in case of retries and failover.
+-------------------------+ |DELETE_PARTITION_MARKED | +-----------+-------------+ | | +-----------v--------------+ |DELETE_PARTITION_STARTED | +-----------+--------------+ | | +-----------v--------------+ |DELETE_PARTITION_FINISHED | +--------------------------+
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description DELETE_PARTITION_FINISHED
This state indicates that the partition is deleted successfully.DELETE_PARTITION_MARKED
This is used when a topic/partition is marked for delete by the controller.DELETE_PARTITION_STARTED
This state indicates that the partition deletion is started but not yet finished. -
Method Summary
Modifier and Type Method Description static RemotePartitionDeleteState
forId(byte id)
byte
id()
static boolean
isValidTransition(RemotePartitionDeleteState srcState, RemotePartitionDeleteState targetState)
static RemotePartitionDeleteState
valueOf(String name)
Returns the enum constant of this type with the specified name.static RemotePartitionDeleteState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DELETE_PARTITION_MARKED
This is used when a topic/partition is marked for delete by the controller. That means, all its remote log segments are eligible for deletion so that remote partition removers can start deleting them. -
DELETE_PARTITION_STARTED
This state indicates that the partition deletion is started but not yet finished. -
DELETE_PARTITION_FINISHED
This state indicates that the partition is deleted successfully.
-
-
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
-
id
public byte id() -
forId
-
isValidTransition
public static boolean isValidTransition(RemotePartitionDeleteState srcState, RemotePartitionDeleteState targetState)
-