Package org.apache.kafka.streams.query
Enum Class FailureReason
- All Implemented Interfaces:
Serializable
,Comparable<FailureReason>
,Constable
This enumeration type captures the various top-level reasons that a particular
partition of a store would fail to execute a query. Stores should generally
respond with a failure message instead of throwing an exception.
Intended to be used in QueryResult.forFailure(FailureReason, String)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe requested store partition does not exist at all.The query required to execute on an active task (viaStateQueryRequest.requireActive()
), but while executing the query, the task was either a Standby task, or it was an Active task not in the RUNNING state.Failure indicating that the requested store partition is not present on the local KafkaStreams instance.Failure indicating that the store partition is not (yet) up to the desired bound.The store that handled the query got an exception during query execution.Failure indicating that the store doesn't know how to handle the given query. -
Method Summary
Modifier and TypeMethodDescriptionstatic FailureReason
Returns the enum constant of this class with the specified name.static FailureReason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
UNKNOWN_QUERY_TYPE
Failure indicating that the store doesn't know how to handle the given query. -
NOT_ACTIVE
The query required to execute on an active task (viaStateQueryRequest.requireActive()
), but while executing the query, the task was either a Standby task, or it was an Active task not in the RUNNING state. The failure message will contain the reason for the failure.The caller should either try again later or try a different replica.
-
NOT_UP_TO_BOUND
Failure indicating that the store partition is not (yet) up to the desired bound. The caller should either try again later or try a different replica. -
NOT_PRESENT
Failure indicating that the requested store partition is not present on the local KafkaStreams instance. It may have been migrated to another instance during a rebalance. The caller is recommended to try a different replica. -
DOES_NOT_EXIST
The requested store partition does not exist at all. For example, partition 4 was requested, but the store in question only has 4 partitions (0 through 3). -
STORE_EXCEPTION
The store that handled the query got an exception during query execution. The message will contain the exception details. Depending on the nature of the exception, the caller may be able to retry this instance or may need to try a different instance.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-