[ 
https://issues.apache.org/jira/browse/KAFKA-13205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Kaleve resolved KAFKA-13205.
-------------------------------------
    Resolution: Fixed

Resolution see https://github.com/strimzi/strimzi-kafka-operator/issues/5427

> Clarify API specification of Kafka Connect endpoint
> ---------------------------------------------------
>
>                 Key: KAFKA-13205
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13205
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>    Affects Versions: 2.7.0
>            Reporter: Jonathan Kaleve
>            Priority: Major
>
> Since Version 2.5, Kafka Connect exposes an Endpoint for getting all topics 
> related to a Connector via its REST API (see [the original 
> KIP|https://cwiki.apache.org/confluence/display/KAFKA/KIP-558%3A+Track+the+set+of+actively+used+topics+by+connectors+in+Kafka+Connect]).
> While the original KIP proposed the Response Payload to look as follows: 
> {code:java}
> {
>   "some-source": {
>     "topics": [
>       "foo",
>       "bar",
>       "baz",               
>     ]
>   }
> }
> {code}
> The documentation by Confluent states the same: 
> [https://docs.confluent.io/platform/current/connect/references/restapi.html#get--connectors-(string-name)-topics]
> The [actual 
> Code|https://github.com/apache/kafka/blob/2.7/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java#L198],
>  however, produces a result of the following form:
> {code:java}
> {
>   "some-source": {
>     "connector": "some-source",
>     "topics": [
>       "foo",
>       "bar",
>       "baz",               
>     ]
>   }
> }
> {code}
>  
>  This poses a problem to some Applications (like [Strimzi 
> Operator|https://github.com/strimzi/strimzi-kafka-operator]) since they 
> expect the response to be of type {{Map<String, Map<String, List<String>>>}} 
> (see 
> [here|https://github.com/strimzi/strimzi-kafka-operator/blob/61a2301390fb9ecc87feb1925d0c2d2f1b2f8107/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaConnectApiImpl.java#L610]),
>  but in Kafka Connect, the return type is actually {{Map<String, Map<String, 
> Object>>}} (see [this 
> test|https://github.com/apache/kafka/blob/2.7/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResourceTest.java#L884],
>  for example)
>  Which type should be expected here? Is the endpoint intended to return the 
> type documented by Confluent, or the type that is actually present in the 
> code? 
> Also: I might be overlooking something, but it seems there is no official 
> documentation of the specific API endpoints of Kafka Connect. Is that correct?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to