[ https://issues.apache.org/jira/browse/KAFKA-18984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Chen resolved KAFKA-18984. ------------------------------- Resolution: Fixed > failed to reset interval.ms by using kafka-client-metrics.sh > ------------------------------------------------------------ > > Key: KAFKA-18984 > URL: https://issues.apache.org/jira/browse/KAFKA-18984 > Project: Kafka > Issue Type: Sub-task > Reporter: Chia-Ping Tsai > Assignee: Cheng Yi Chang > Priority: Major > Fix For: 4.1.0, 3.9.1, 4.0.1 > > > *now* > kafka-client-metrics.sh can't reset `interval` config due to conversion error. > {code:java} > public void alterClientMetrics(ClientMetricsCommandOptions opts) > throws Exception { > String entityName = opts.hasGenerateNameOption() ? > Uuid.randomUuid().toString() : opts.name().get(); > Map<String, String> configsToBeSet = new HashMap<>(); > // it should not convert the empty string to number > opts.interval().map(intervalVal -> > configsToBeSet.put("interval.ms", intervalVal.toString())); > opts.metrics().map(metricslist -> configsToBeSet.put("metrics", > String.join(",", metricslist))); > opts.match().map(matchlist -> configsToBeSet.put("match", > String.join(",", matchlist))); > {code} > *out of date description* > the delete op defined by > [KIP-714|https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability#KIP714:Clientmetricsandobservability-Deleteaclientmetricsconfigurationresource] > is shown below. > {code:java} > $ kafka-client-metrics.sh --bootstrap-server $BROKERS --delete --name > MYMETRICS > > $ kafka-configs.sh --bootstrap-server $BROKERS --alter --entity-type > client-metrics --entity-name MYMETRICS \ > --delete-config metrics,interval.ms,match > {code} > That means `kafka-client-metrics.sh` can NOT remove specific config from the > client metrics. -- This message was sent by Atlassian Jira (v8.20.10#820010)