...
- Bump up the valid versions range
- New fields -
IncludeType
and fieldIncludeDocumentation
- with default value of false
Code Block |
---|
{ "apiKey": 32, "type": "request", "name": "DescribeConfigsRequest", // Version 1 adds IncludeSynoyms. // Version 2 is the same as version 1. // Version 3 is the same as version 2. "validVersions": "0-3", <--- Updated Field "flexibleVersions": "none", "fields": [ { "name": "Resources", "type": "[]DescribeConfigsResource", "versions": "0+", "about": "The resources whose configurations we want to describe.", "fields": [ { "name": "ResourceType", "type": "int8", "versions": "0+", "about": "The resource type." }, { "name": "ResourceName", "type": "string", "versions": "0+", "about": "The resource name." }, { "name": "ConfigurationKeys", "type": "[]string", "versions": "0+", "nullableVersions": "0+", "about": "The configuration keys to list, or null to list all configuration keys." } ]}, { "name": "IncludeSynoyms", "type": "bool", "versions": "1+", "default": "false", "ignorable": false, "about": "True if we should include all synonyms." } { "name": "IncludeTypeIncludeDocumentation", "type": "bool", "versions": "1+", "default": "false", "ignorable": false, <--- New Field "about": "True if we should include configuration typedocumentation." } { "name": "IncludeDocumentation", ] } |
Response
The changes to the Response schema include
- Bump valid versions range
- Add new Fields -
ConfigValueType and Documentation
Code Block |
---|
{ "apiKey": 32, "type": "boolresponse", "versionsname": "1+DescribeConfigsResponse", "defaultvalidVersions": "false", "ignorable": false0-3", <--- NewUpdated Field "flexibleVersions": "none", "aboutfields": "True[ if we should include configuration documentation." } ] } |
Response
The changes to the Response schema include
...
Code Block |
---|
{ "apiKey": 32, "type": "response", "name": "DescribeConfigsResponse", "validVersions": "0-3", <--- Updated Field "flexibleVersions": "none", "fields": [ { "name": "ThrottleTimeMs", "type": "int32{ "name": "ThrottleTimeMs", "type": "int32", "versions": "0+", "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, { "name": "Results", "type": "[]DescribeConfigsResult", "versions": "0+", "about": "The durationresults infor milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." }, { "name": "Results", each resource.", "fields": [ { "name": "ErrorCode", "type": "[]DescribeConfigsResultint16", "versions": "0+", "about": "The resultserror forcode, each resource.", "fields": [or 0 if we were able to successfully describe the configurations." }, { "name": "ErrorCodeErrorMessage", "type": "int16string", "versions": "0+", "nullableVersions": "0+", "about": "The error codemessage, or 0null if we were able to successfully describe the configurations." }, { "name": "ErrorMessageResourceType", "type": "stringint8", "versions": "0+", "nullableVersions": "0+", "about": "The error message, or null if we were able to successfully describe the configurations." resource type." }, { "name": "ResourceTypeResourceName", "type": "int8string", "versions": "0+", "about": "The resource typename." }, { "name": "ResourceNameConfigs", "type": "string[]DescribeConfigsResourceResult", "versions": "0+", "about": "TheEach resourcelisted nameconfiguration." }, , "fields": [ { "name": "ConfigsName", "type": "[]DescribeConfigsResourceResultstring", "versions": "0+", "about": "EachThe listedconfiguration configurationname.", "fields": [ }, { "name": "NameValue", "type": "string", "versions": "0+", "nullableVersions": "0+", "about": "The configuration namevalue." }, { "name": "ValueReadOnly", "type": "stringbool", "versions": "0+", "nullableVersions": "0+", "about": "TheTrue if the configuration is valueread-only." }, { "name": "ReadOnlyIsDefault", "type": "bool", "versions": "0+", "about": "True if the configuration is read-onlynot set." }, { "name"// Note: "IsDefault", "type": "bool", "versions": "0", "about": "True if the configuration is not set." }, // Note: the v0 default for this field that should be exposed to callers is // context-dependent. the v0 default for this field that should be exposed to callers is // context-dependent. For example, if the resource is a broker, this should default to 4. // -1 is just a placeholder value. { "name": "ConfigSource", "type": "int8", "versions": "1+", "default": "-1", "ignorable": true, "about": "The configuration source." }, { "name": "IsSensitive", "type": "bool", "versions": "0+", "about": "True if this configuration is sensitive." }, { "name": "Synonyms", "type": "[]DescribeConfigsSynonym", "versions": "1+", "ignorable": true, "about": "The synonyms for this configuration key.", "fields": [ { "name": "Name", "type": "string", "versions": "1+", "about": "The synonym name." }, { "name": "Value", "type": "string", "versions": "1+", "nullableVersions": "0+", "about": "The synonym value." }, { "name": "Source", "type": "int8", "versions": "1+", "about": "The synonym source." } ]}, { "name": "ConfigValueType", "type": "int8", "versions": "3+", default": "0", <--- New Field "about": "The configuration data type."}, { "name": "Documentation", "type": "string", "versions": "3+", "nullableVersions": "0+", <--- New Field", "type": "string", "versions": "3+", "nullableVersions": "0+", <--- New Field "about": "The configuration documentation." }, ]} ]} ] } |
AdminClient Class
No new method will be added or updated to the AdminCient
class.
AbstractConfig Class
As part of this KIP, a new method will be added to AbstractConfig to return the documentation of the given Config
Code Block |
---|
public String documentationOf(String key) { ConfigDef.ConfigKey configKey = definition.configKeys().get(key); if (configKey == null) "about": "The configuration documentation." }, return null; ]} return ]} configKey.documentation; ] } |
AdminClient Class
...
Proposed Changes
Under the proposed change, response for AdminClient.describeConfigs
would include following new properties, which would be part of DescribeConfigsResponse.ConfigEntry
class.
...
Default Behavior
By default, the new fields would `documentation` field will not be included in the response to describeConfigs
. This is to avoid the response from boating up as the value for documentation
field can be quite large.
...
Code Block | ||
---|---|---|
| ||
KafkaAdminClient.describeConfigs(
resources,
new DescribeConfigsOptions()
.includeSynonyms(true)
.includeType(true)
.includeDocumentation(true)
) |
...