This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • KIP-151 Expose Connector type in REST API
Skip to end of metadata
Go to start of metadata

Status

Current state: Accepted

Discussion thread: here

JIRA: KAFKA-4343

Released: 0.11.0.0

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

Motivation

Currently we don't expose information about whether a connector is a source or sink. This is useful when, e.g., categorizing connectors in a UI. Given naming conventions we try to encourage you might be able to determine this via the connector's class name, but that isn't reliable. We would also like to expose a Connector's version information.

Public Interfaces

We will modify the following REST API endpoint for Connect:

GET /connector-plugins

Proposed Changes

The aforementioned endpoint currently returns the following structure:

[ 
  { "class": "org.apache.kafka.connect.file.FileStreamSourceConnector" },
  { "class": "org.apache.kafka.connect.file.FileStreamSinkConnector" }
]
We will add a `type` field to each element of the array that indicates whether the given Connector is a Source or SInk. e.g.:

 

[ 
  { 
    "class": "org.apache.kafka.connect.file.FileStreamSourceConnector",
    "type": "source",
	"version": "0.11.0.0"
  },
  { 
    "class": "org.apache.kafka.connect.file.FileStreamSinkConnector",
    "type": "sink",
	"version": "0.11.0.0"
  }
]

 

Compatibility, Deprecation, and Migration Plan

  • This is purely an addition to the current API and is backwards compatible.

Rejected Alternatives

The current method to get this information is to use a heuristic (does a class contain SInk/Source?), or use a lookup table. Neither of which works in every case, or with dynamically loaded Connectors.

  • No labels