Versions Compared

Key

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

...

Code Block
languagejava
    /**
     * This is a convenience method for {@link #describeAcls(Collection<AclBindingFilter>, DescribeAclsOptions)} with
     * default options. See the overload for more details.
     * <p>
     *
     * This operation is supported by brokers with version 3.5 or higher.      
     * @param filters The filters to use.
     * @return The DescribeAclsResult.
     */
    default DescribeAclsResult describeAcls(Collection<AclBindingFilter> filters) {
        return describeAcls(filters, new DescribeAclsOptions());
    }

    /**
     * Lists access control lists (ACLs) according to the supplied filters.
     * <p>
     * Note: it may take some time for changes made by {@code createAcls} or {@code deleteAcls} to be reflected
     * in the output of {@code describeAcls}.
     * <p>
     *
     * This operation is supported by brokers with version 3.5 or higher.         
     * @param filters The filters to use.
     * @param options The options to use when listing the ACLs.
     * @return The DescribeAclsResult.
     */
    DescribeAclsResult describeAcls(Collection<AclBindingFilter> filters, DescribeAclsOptions options);

    /**
     * Describes all entities matching the provided filters that have at least one client quota configuration
     * value defined.
     * <p>
     * This is a convenience method for {@link #describeClientQuotas(Collection<ClientQuotaFilter>, DescribeClientQuotasOptions)}
     * with default options. See the overload for more details.
     * <p>
     * This operation is supported by brokers with version 3.5 or higher.
     *
     * @param filters The filters to apply to match entities.
     * @return The DescribeClientQuotasResult.
     */
    default DescribeClientQuotasResult describeClientQuotas(Collection<ClientQuotaFilter> filters) {
        return describeClientQuotas(filters, new DescribeClientQuotasOptions());
    }

    /**
     * Describes all entities matching the provided filters that have at least one client quota configuration
     * value defined.
     * <p>
     * The following exceptions can be anticipated when calling {@code get()} on the future from the
     * returned {@link DescribeClientQuotasResult}:
     * <ul>
     *   <li>{@link org.apache.kafka.common.errors.ClusterAuthorizationException}
     *   If the authenticated user didn't have describe access to the cluster.</li>
     *   <li>{@link org.apache.kafka.common.errors.InvalidRequestException}
     *   If the request details are invalid. e.g., an invalid entity type was specified.</li>
     *   <li>{@link org.apache.kafka.common.errors.TimeoutException}
     *   If the request timed out before the describe could finish.</li>
     * </ul>
     * <p>
     * This operation is supported by brokers with version 3.5 or higher.
     *
     * @param filters The filters to apply to match entities.
     * @param options The options to use.
     * @return The DescribeClientQuotasResult.
     */
    DescribeClient
QuotasResult describeClientQuotas(Collection<ClientQuotaFilter> filters, DescribeClientQuotasOptions options);

Deprecate the existing describeACLs and describeClientQuotas methods

...

Users should now use the new methods.

...

2) Extending the Admin API: It introduces four new methods to the Admin interface. These methods accept a collection of filters to retrieve ACLs and quotas for multiple entities in a single call. They follow the same pattern as existing calls that already accepts multiple entities such as deleteACLs(). Existing methods for single entities will be deprecated. When using the new methods, if the brokers don't support the new protocol, the Admin client will use the older API and send multiple requests if necessary.

3) Updating the Result types for describeACLs and describeClientQuotas: For consistency, it makes sense to keep the existing types. Existing methods will be deprecated and new methods will be added to handle collections of entities.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior how will we phase out the older behavior?
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

This is adding new APIs. The older describeACLs and describeClientQuotas calls will be kept but deprecated. When using brokers that don't support the new APIs, the Admin client will be able to downconvert requests and send multiple older requests to satisfy calls with several entities.

Test Plan

We will add unit and integration tests to cover the internal changes and new APIs.

Rejected Alternatives

None