Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current stateDraftDiscarded, reported as a bug by 

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-7759

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Kafka Connect provides a REST interface for managing connectors. Below is a list of supported documented endpoints:

MethodPath
GET /connectors
POST
GET/connectors/{name}
GET/connectors/{name}/config
PUT
GET/connectors/{name}/status
GET/connectors/{name}/tasks
GET/connectors/{name}/tasks/{taskid}/status
PUT/connectors/{name}/pause
PUT/connectors/{name}/resume
POST/connectors/{name}/restart
POST  /connectors/{name}/tasks/{taskId}/restart
DELETE/connectors/{name}
GET/connector-plugins
PUT/connector-plugins/{connector-type}/config/validate

In addition to above methods, OPTIONS method could be also used.

Responce Response to OPTIONS request includes auto-generated WADL, e.g.:

...

Add configuration parameter:

  • rest.wadl.enable with default the default value of 'true', and with the importance of 'low'.

Update org.apache.kafka.connect.runtime.rest.RestServer to respect the configuration property described above.

With rest.wadl.enable=true, responce  response to OPTIONS method should have list of supported HTTP methods only, e.g.:




Code Block
languagebash
curl -i -X OPTIONS http://localhost:8083/connectors/jdbc-sink
HTTP/1.1 200 OK
Date: Thu, 13 Dec 2018 02:52:30 GMT
Content-Type: text/plain
Allow: HEAD,DELETE,GET,OPTIONS
Content-Length: 26
Server: Jetty(9.4.12.v20180830)

HEAD, DELETE, GET, OPTIONS


Test plan

Add more unit tests under org.apache.kafka.connect.runtime.rest.RestServerTest, asserting on responceresponse's Content-type.


Compatibility, Deprecation, and Migration Plan

Since the default value of the new configuration parameter is 'true', the change should be backward compatible, no action is required for upgrading from older versions.

...

  1. Disable exposure of WADL without an option to keep exposing it. Some users might rely upon it.