THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Table of Contents |
---|
Status
Current state: Under Discussion Adopted
Discussion thread: here
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
AlterConfigs Response (Version: 0) => [responses]
responses => resource_type resource_name error_code error_message
resource_type => INT8
resource_name => STRING
error_code => INT16
error_message => NULLABLE_STRING |
Policy
In a similar fashion to KIP-108: Create Topic Policy, we allow users to define a policy class to validate alter configs requests. The config name will be alter.configs.policy.class.name
and the interface follows:
...
Code Block | ||||
---|---|---|---|---|
| ||||
public class AdminClient { public DescribeConfigsResult describeConfigs(Collection<ConfigResource> resources, DescribeConfigsOptions options); public AlterConfigsResult alterConfigs(Map<ConfigResource, Config> configs, AlterConfigsOptions options); } public class DescribeConfigsOptions { public DescribeConfigsOptions timeoutMs(Integer timeout); } public class DescribeConfigsResult { public Map<ConfigResource, KafkaFuture<Config>> results() public KafkaFuture<Map<ConfigResource, Config>> all(); } public class AlterConfigsOptions { public AlterConfigsOptions timeoutMs(Integer timeout); public AlterConfigsOptions validateOnly(boolean validateOnly); } public class AlterConfigsResult { public KafkaFuture<Void> all(); public Map<ConfigResource, KafkaFuture<Void>> results(); } public class ConfigResource { enum Type { BROKER, TOPIC, UNKNOWN; } public ConfigResource(Type type, String name) { ... } public Type type() { ... } public String name() { ... } } public class Config { public Config(Collection<ConfigEntry> configs) { ... } public Collection<ConfigEntry> entries() { ... } public Config get(String name) { ... } } public class ConfigEntry { public ConfigEntry(String name, String value) { this(name, value, false, false, false); } public ConfigEntry(String name, String value, boolean isDefault, boolean isSensitive, boolean isReadOnly) { ... } public String name() { ... } public String value() { ... } public boolean isDefault { ... } public boolean isSensitive { ... } public boolean isReadOnly { ... } } |
...