Enum Class FailureReason

java.lang.Object
java.lang.Enum<FailureReason>
org.apache.kafka.streams.query.FailureReason
All Implemented Interfaces:
Serializable, Comparable<FailureReason>, Constable

@Evolving public enum FailureReason extends Enum<FailureReason>
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).

  • Enum Constant Details

    • UNKNOWN_QUERY_TYPE

      public static final FailureReason UNKNOWN_QUERY_TYPE
      Failure indicating that the store doesn't know how to handle the given query.
    • NOT_ACTIVE

      public static final FailureReason NOT_ACTIVE
      The query required to execute on an active task (via StateQueryRequest.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

      public static final FailureReason 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

      public static final FailureReason 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

      public static final FailureReason 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

      public static final FailureReason 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

      public static FailureReason[] 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

      public static FailureReason valueOf(String name)
      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 name
      NullPointerException - if the argument is null