You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jordan Moore (JIRA)" <ji...@apache.org> on 2019/05/01 22:05:00 UTC
[jira] [Closed] (KAFKA-8310) CommandLineUtils.parseKeyValueArgs
--property flag too greedy when splitting key=value pairs
[ https://issues.apache.org/jira/browse/KAFKA-8310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jordan Moore closed KAFKA-8310.
-------------------------------
> CommandLineUtils.parseKeyValueArgs --property flag too greedy when splitting key=value pairs
> --------------------------------------------------------------------------------------------
>
> Key: KAFKA-8310
> URL: https://issues.apache.org/jira/browse/KAFKA-8310
> Project: Kafka
> Issue Type: Bug
> Components: producer
> Affects Versions: 1.1.0
> Reporter: Jordan Moore
> Priority: Trivial
> Fix For: 2.1.0
>
>
> The CommandLineUtils split apart all equal signs in the key-value pair rather than just the first, therefore making something like this fail.
> {code:java}
> --property value.schema='{"name":"foo", "type":"string", "doc": "key=value"}'{code}
> as it tries to assign these two properties separately
> {code:java}
> {"name":"foo", "type":"string", "doc": "key{code}
> {code:java}
> value"}{code}
> Issue here
> [https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/utils/CommandLineUtils.scala#L99]
> Ideally, the code should do something like indexOf("="), to get the first one, then substring from there.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)