Table of Contents |
---|
Status
Current state: Under DiscussionAccepted
Discussion thread:https://www.mail-archive.com/dev@kafka.apache.org/msg97405.html
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
Release: AK 2.3.0
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
Connect's API provides a list method which returns all running connector names (/connectors) as well as state info methods parameterized by name (/connectors/{connectorName}/status). This leads to a situation where users of this API need to make N api calls to get information about all their running connectors.
...
The current `/connectors` endpoint will gain a new multi query param `?expand=(truestatus|falseinfo)` which will return a map {stringconnectorName->expansion->(ConnectorStateInfo|ConnectorInfo)}.
the following expansions are allowed
expand | class returned |
---|---|
status | ConnectorStateInfo |
info | ConnectorInfo |
Code Block |
---|
w:kafka norwood$ curl -s http://localhost:8083/connectors | jq [ "blah" ] |
...
Code Block |
---|
w:kafka norwood$ curl -s 'http://localhost:8083/connectors?expand=status&expand=trueinfo' | jq { "blah": { "info": { "name": "blah", "config": { "connector.class": "org.apache.kafka.connect.file.FileStreamSourceConnector", "file": "/tmp/lol", "tasks.max": "10", "name": "blah", "topic": "test-topic" }, "tasks": [ { "connector": "blah", "task": 0 } ], "type": "source" }, "status": { "name": "blah", "connector": { "state": "RUNNING", "worker_id": "10.200.725.135241:8083" }, "tasks": [ { "id": 0, "state": "RUNNING", "worker_id": "10.200.725.135241:8083" } ], "type": "source" } } } |
Proposed Changes
The changes are ~entirely in ConnectorsResource and the Herders. PR: https://github.com/apache/kafka/pull/6658
...