Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Specify array of resources instead of tuples

...

  • --zookeeper will be deprecated, which means it will display a warning message saying that it's ignored.
  • a new --bootstrap-server option will be added
  • a new --adminclient.config.properties option will be added

Protocol Changes

...

Code Block
languagejs
titleDescribeQuotas Request
DescribeQuotas Request (Version: 1) => [resource]
  resource => [quota_config_resource child_quota_config_resource ] [config_name]
    quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    child_quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    config_name => STRING

Request semantics:

  1. Can be sent to any broker
  2. If the name is <default> it means that listing the default quota is asked. Responses will be returned the same way for defaults.
  3. If the config_name array is null, all configs are returned. Otherwise, configs with the provided names are returned.
  4. Authorization:  "DescribeQuotas" can only be interpreted on the "Cluster" resource and represented by the DescribeConfigs ACL due to the similarity in use cases. Unauthorized requests will receive an appropriate AuthorizationFailed error code.

...

Code Block
languagejs
titleDescribeQuotas Response
DescribeQuotas Response (Version: 1) => throttle_time_ms [resource]
  throttle_time_ms => INT32
  resource => [quota_config_resource child_quota_config_resource] [config]
    quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    child_quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    config => error_code error_message [config_entry]
      error_code => INT16
      error_message => NULLABLE_STRING
      config_entry =>
        config_name => STRING
        config_value => STRING
        read_only => BOOLEAN
        is_default => BOOLEAN
        is_sensitive => BOOLEAN

...

Code Block
languagejs
titleAlterQuotas Request
AlterQuota Request (Version: 0) => validate_only [resource]
  validate_only => BOOLEAN
  resource => [quota_config_resource child_quota_config_resource] [config]
    quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    child_quota_config_resource => type nameconfig_name config_value
      typeconfig_name => INT8STRING
      nameconfig_value => NULLABLE_STRING
    config => config_name config_value
      config_name => STRING
      config_value => STRINGSTRING

Request Semantics

  1. Can be sent to any broker
  2. If name is <default> it means that altering a default quota is asked.
  3. If an Alter operation is attempted on a read-only config, an InvalidRequestException error will be returned for the relevant resource.
  4. Authorization:  "AlterQuotas" can only be interpreted on the "Cluster" resource and represented by the AlterConfigs ACL due to the similarity in use cases. Unauthorized requests will receive an appropriate AuthorizationFailed error code.
  5. For tools that allow users to alter quota configs, a validation/dry-run mode where validation errors are reported but no creation is attempted is available via the validate_only parameter.

...

Code Block
languagejs
titleAlterQuotas Response
AlterQuotas Response (Version: 0) => throttle_time_ms [resource]
  throttle_time_ms => INT32
  resource => [quota_config_resource child_quota_config_resource] [config]
    quota_config_resource => type name
      type => INT8
      name => NULLABLE_STRING
    child_quota_config_resource => type name
      typeerror_code => INT8INT16
      nameerror_message => NULLABLE_STRING
    config =>
      error_code => INT16
      error_message => NULLABLE_STRING
        config_name => STRING

AdminClient APIs

...

Code Block
languagejava
titleorg.apache.kafka.common.requests
public class DescribeQuotasRequest extends AbstractRequest {
	
	public static Schema[] schemaVersions();
	public static DescribeQuotasRequest parse(ByteBuffer buffer, short version);
 
	public static class Builder extends AbstractRequest.Builder {
		public Builder(Map<QuotaConfigResourceTuple, Collection<String>> quotaConfigSettings);
		public DescribeQuotasRequest build(short version);
	}
 
	public DescribeQuotasRequest(short version, Map<QuotaConfigResourceTuple, Collection<String>> quotaConfigSettings);
	public DescribeQuotasRequest(Struct struct, short version);
 
	public Map<QuotaConfigResourceTuple, Collection<String>> quotaConfigSettings();
}

public class DescribeQuotasResponse extends AbstractResponse {
	public static Schema[] schemaVersions();

	public DescribeQuotasResponse(int throttleTimeMs, Map<QuotaConfigResourceTuple, DescribeConfigsResponse.Config> configs);
	public DescribeQuotasResponse(Struct struct);

	public Map<QuotaConfigResourceTuple, DescribeConfigsResponse.Config> quotaConfigSettings();
}

/**
 * Stores a child and its parent resource. This is used for representing a (user, client) resource tuple where
 * the user part considered to be the parent resource and the client is the child.
 */
public final class QuotaConfigResourceTuple {

    private final Resource quotaConfigResource;
    private final Resource childQuotaConfigResource;

    public Resource quotaConfigResource();
    public Resource childQuotaConfigResource();


    public QuotaConfigResourceTuple(Resource quotaConfigResource);
    public QuotaConfigResourceTuple(Resource quotaConfigResource, Resource childQuotaConfigResource);
}

 

New Command Line Interface

...