Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: Under Discussion Accepted

Discussion thread: https://lists.apache.org/thread/mbjlgbv2q4x5ml7mx93ls77bg93wtrfy

...

Code Block
languagejava
linenumberstrue
public class DescribeFeaturesOptions extends AbstractOptions<DescribeFeaturesOptions> {
      private Optional<Integer>OptionalInt nodeId = OptionalOptionalInt.empty();

    /**
     * Set the node id to which the request should be sent.
     */
    public DescribeFeaturesOptions nodeId(int nodeId) {
        this.nodeId = OptionalOptionalInt.of(nodeId);
        return this;
    }

    /**
     * The node id to which the request should be sent. If using bootstrap controller and the node id is empty,
     * the request will be sent to the controller node. If using bootstrap broker and node id is empty, the
     * request will be sent to the first available nodearbitrary controller/broker.
     */
    public Optional<Integer>OptionalInt nodeId() {
        return nodeId;
    }
}

...

  • If nodeId is valid, the Admin client sends ApiVersionRequest to a node with nodeId.

  • If nodeId is not registered, the Admin client throws TimeoutException.

kafka-features.sh

  • The empty —-node-id can work as usual.

  • If nodeId is negative, the FeatureCommand throws IllegalArgumentException.

  • If nodeId is valid, the FeatureCommand get gets ApiVersionResponse from a node with nodeId.

  • If nodeId is not registered, the FeatureCommand throws AdminCommandFailedException.

...

Alternatives

N/AUse metrics to track finalized level and minimum / maximum supported level. The approach has been accepted in KIP-1180: Add generic feature level metrics.