THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
public static class Quota { public QuotaType type(); public double value(); public QuotaSource source(); } public static enum QuotaType { PRDOUCER_BYTE_RATE(0), CONSUMER_BYTE_RATE(1), REQUEST_PERCENTAGE(2); QuotaType(byte id); public byte id(); } public static enum QuotaSource { SELF(0), DEFAULT(1), PARENT(2); QuotaSource(byte id); public byte id(); } /** * Represents a list of Resource objects that have a hierarchical relationship. * For instance one could represent relationship like "clientA of user1". */public class AdminClient { public DescribeQuotasResult describeQuotas(Map<AbstractList<Resource>, <Collection<QuotaType>>, DescribeQuotasOptions options); public AlterQuotasResult alterQuotas(Map<AbstractList<Resource>, <Collection<Quota>> configs, AlterQuotasOptions options); } public class ResourceListDescribeQuotasOptions { public ResourceListDescribeQuotasOptions timeoutMs(String user, String clientInteger timeout); } public class DescribeQuotasResult { public ResourceList(ResourceType typeMap<AbstractList<Resource>, String<KafkaFuture<Collection<Quota>>> resourceNamevalues(); } /** public class AlterQuotasOptions { * Returns the listpublic ofAlterQuotasOptions resources in a top to bottom (first to last) order. */timeoutMs(Integer timeout); public AlterQuotasOptions validateOnly(boolean validateOnly); } public class AlterQuotasResult { public List<Resource> resourcesMap<AbstractList<Resource>, <KafkaFuture<Void>> results(); } /** * A helper class that makes sure that a given collection of Quota objects * are immutably stored and can be accessed. */ public class QuotaCollection { public QuotaCollection(Collection<Quota> entries); |
Request API
Code Block | ||||
---|---|---|---|---|
| ||||
public class QuotaCollection { public QuotaCollection(ApiError error, Collection<Quota> entries); public QuotaCollection(Collection<Quota> entries); public ApiError error(); public Collection<Quota> entries(); } /** * This public class actsDescribeQuotasRequest asextends an alias for a HashMap that maps a list of Resource * objects which represents hierarchical */ public class QuotaResourceMap extends HashMap<ResourceList, T> { public QuotaResourceMap(ResourceList key, T value); public QuotaResourceMap(Map<ResourceList, T>); } public class AdminClient { public DescribeQuotasResult describeQuotas(QuotaResourceMap<Collection<QuotaType>>, DescribeQuotasOptions options); public AlterQuotasResult alterQuotas(QuotaResourceMap<QuotaCollection> configs, AlterQuotasOptions options); } public class DescribeQuotasOptions { public DescribeQuotasOptions timeoutMs(Integer timeout); } public class DescribeQuotasResult { public QuotaResourceMap<KafkaFuture<QuotaCollection>> values(); } public class AlterQuotasOptions { public AlterQuotasOptions timeoutMs(Integer timeout); public AlterQuotasOptions validateOnly(boolean validateOnly); } public class AlterQuotasResult { public QuotaResourceMap<KafkaFuture<Void>> results(); } |
Request API
Code Block | ||||
---|---|---|---|---|
| ||||
public class QuotaCollection { public QuotaCollection(ApiError error, Collection<Quota> entries); public QuotaCollection(Collection<Quota> entries); public ApiError error(); public Collection<Quota> entries(); } public class DescribeQuotasRequest extends AbstractRequest { public static Schema[] schemaVersions(); public static DescribeQuotasRequest parse(ByteBuffer bufferAbstractRequest { public static Schema[] schemaVersions(); public static DescribeQuotasRequest parse(ByteBuffer buffer, short version); public static class Builder extends AbstractRequest.Builder { public Builder(Map<AbstractList<Resource>, <Collection<QuotaType>> quotaSettings); public DescribeQuotasRequest build(short version); } public DescribeQuotasRequest(short version, Map<AbstractList<Resource>, <Collection<QuotaType>> quotaSettings); public DescribeQuotasRequest(Struct struct, short version); public Map<AbstractList<Resource>, Collection<QuotaType>> quotaTypes(); } public class DescribeQuotasResponse extends AbstractResponse { public static Schema[] schemaVersions(); public DescribeQuotasResponse(int throttleTimeMs, Map<AbstractList<Resource>, QuotaCollection> quotas); public DescribeQuotasResponse(Struct struct); public Map<AbstractList<Resource>, QuotaCollection> quotas(); } public class AlterQuotasRequest extends AbstractRequest { public static Schema[] schemaVersions(); public static class Builder extends AbstractRequest.Builder { public Builder(Map<AbstractList<Resource>, QuotaCollection> quotaSettings); public DescribeQuotasRequest build(short version); } public AlterQuotasRequest(short version, Map<AbstractList<Resource>, QuotaCollection> quotas, boolean validateOnly); public AlterQuotasRequest(Struct struct, short version); public Map<AbstractList<Resource>, QuotaCollection> quotas(); } public class AlterQuotasResponse extends AbstractResponse { public static Schema[] schemaVersions(); public AlterQuotasRequest(short version, Map<AbstractList<Resource>, ApiError> quotas, boolean validateOnly); public AlterQuotasRequest(Struct struct, short version); public static class Builder extends AbstractRequest.Builder { public Builder(QuotaResourceMap<Collection<QuotaType>> quotaSettings); public DescribeQuotasRequest build(short version); } public DescribeQuotasRequest(short version, QuotaResourceMap<Collection<QuotaType>> quotaSettings); public DescribeQuotasRequest(Struct struct, short version); public QuotaResourceMap<Collection<QuotaType>> quotaTypes(); } public class DescribeQuotasResponse extends AbstractResponse { public static Schema[] schemaVersions(); public DescribeQuotasResponse(int throttleTimeMs, QuotaResourceMap<QuotaCollection> quotas); public DescribeQuotasResponse(Struct struct); public QuotaResourceMap<QuotaCollection> quotas(); } public class AlterQuotasRequest extends AbstractRequest { public static Schema[] schemaVersions(); public static class Builder extends AbstractRequest.Builder { public Builder(QuotaResourceMap<QuotaCollection> quotaSettings); public DescribeQuotasRequest build(short version); } public AlterQuotasRequest(short version, QuotaResourceMap<QuotaCollection> quotas, boolean validateOnly); public AlterQuotasRequest(Struct struct, short version); public QuotaResourceMap<QuotaCollection> quotas(); } public class AlterQuotasResponse extends AbstractResponse { public static Schema[] schemaVersions(); public AlterQuotasRequest(short version, QuotaResourceMap<ApiError> quotas, boolean validateOnly); public AlterQuotasRequest(Struct struct, short version); public QuotaResourceMap<ApiError> errors(); public int throttleTimeMs(); } |
New Command Line Interface
The kafka-config.sh command line interface will change a little bit in terms of help message and response format as we will use argparse4j for parsing arguments.
Help Message
Map<AbstractList<Resource>, ApiError> errors();
public int throttleTimeMs();
}
|
New Command Line Interface
The kafka-config.sh command line interface will change a little bit in terms of help message and response format as we will use argparse4j for parsing arguments.
Help Message
No Format |
---|
usage: config-command [-h] --entity-type {topics,clients,users,brokers}
[--force FORCE] [--add-config ADDCONFIG]
[--delete-config DELETECONFIG]
(--entity-name ENTITYNAME | --entity-default)
(--describe | --alter)
(--bootstrap-server BOOTSTRAPSERVERS | |
No Format |
usage: config-command [-h] --entity-type {topics,clients,users,brokers} [--force FORCE] [--add-config ADDCONFIG] adminclient.config CONFIGPROPERTIES | --adminclient-property ADMINCLIENTPROPERTY) Change configs for topics, clients, users, brokers dynamically. optional arguments: -h, [--delete-config DELETECONFIG] help show this help message and exit (--entity-name ENTITYNAME | --entity-default)type {topics,clients,users,brokers} (--describe | --alter) REQUIRED: the (--bootstrap-servers BOOTSTRAPSERVERS | type of entity --adminclient.config CONFIGPROPERTIES) Change configs for topics, clients, users, brokers dynamically. optional arguments: -h, --help (topics/clients/users/brokers) --force FORCE show this help messageSuppresses andconsole exitprompts --entityadd-type {topics,clients,users,brokers}config ADDCONFIG REQUIRED:Key Value pairs theof configs type to add. Square of entity brackets can be used (topics/clients/users/brokers) --force FORCE to group values which Suppresses console prompts --add-config ADDCONFIG contain commas: 'k1=v1,k2=[v1,v2,v2],k3=v3'. --delete-config DELETECONFIG Key Value pairs of configs to add. Square Config keys to remove in the following form: 'k1, brackets can be used to group k2'. values You which can specify only one in --entity-name and --entity-default --entity-name ENTITYNAME contain commas: 'k1=v1,k2=[v1,v2,v2],k3=v3'. --delete-config DELETECONFIG Name of entity (client id/user principal name) --entity-default Default entity name for Config keysclients/users (applies to remove in the following form: 'k1, corresponding entity type in k2'.command line) You can specify only one in --entity-name and alter, --entity-defaultdescribe --entity-name ENTITYNAME describe List configs for the given entity. (default: Name of entity (client id/user principal namefalse) --entity-defaultalter Default entity name for clients/users (applies to Alter the configuration for the entity. (default: corresponding entity type in command linefalse) REQUIRED. You can specify only one in --bootstrap-alterservers, --describeadminclient.config --describe List configs for the given entity. (default: bootstrap-server BOOTSTRAPSERVER The broker list string in the false)form --alter Alter the configuration for the entity. (default: HOST1:PORT1,HOST2:PORT2. --adminclient.config ADMINCLIENTCONFIG false) You can specify only one in --bootstrap-servers, --adminclient.config --bootstrap-servers BOOTSTRAPSERVERS The config properties file for the REQUIRED: The broker list string in the Admin formClient. --adminclient-propert ADMINCLIENTPROPERTY HOST1:PORT1,HOST2:PORT2. --adminclient.config CONFIGPROPERTIES Comma separated list of properties in the REQUIRED: The config properties form file for theof 'k1=v1,k2=v2' to initialize the Adminadmin Clientclient. Process finished with exit code 0 |
...