THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We will modify the following REST API endpoint endpoints for Connect to include the type of the connector:
Code Block |
---|
GET /connectors/(string:name)
GET /connectors/(string:name)/status |
Proposed Changes
The aforementioned endpoint endpoint GET /connectors/(string:name)
currently returns the following structure:
...
We will add a `type` field to the document to indicate whether the given Connector is a Source or SInkSink. e.g.:
Code Block |
---|
HTTP/1.1 200 OK Content-Type: application/json { "name": "hdfs-sink-connector", "config": { "connector.class": "io.confluent.connect.hdfs.HdfsSinkConnector", "tasks.max": "10", "topics": "test-topic", "hdfs.url": "hdfs://fakehost:9000", "hadoop.conf.dir": "/opt/hadoop/conf", "hadoop.home": "/opt/hadoop", "flush.size": "100", "rotate.interval.ms": "1000" }, "type": "sink", "tasks": [ { "connector": "hdfs-sink-connector", "task": 1 }, { "connector": "hdfs-sink-connector", "task": 2 }, { "connector": "hdfs-sink-connector", "task": 3 } ] } |
For the following REST API endpoint:
Similarly, the endpoint GET /connectors/(string:name)/status
Proposed Changes
The aforementioned endpoint currently currently returns the following structure:
Code Block |
---|
HTTP/1.1 200 OK { "name": "hdfs-sink-connector", "connector": { "state": "RUNNING", "worker_id": "fakehost:8083" }, "tasks": [ { "id": 0, "state": "RUNNING", "worker_id": "fakehost:8083" }, { "id": 1, "state": "FAILED", "worker_id": "fakehost:8083", "trace": "org.apache.kafka.common.errors.RecordTooLargeException\n" } ] } |
We will add a `type` field to the response to indicate whether the given Connector is a Source or SInkSink. e.g.:
Code Block |
---|
HTTP/1.1 200 OK { "name": "hdfs-sink-connector", "connector": { "type": "sink", "state": "RUNNING", "worker_id": "fakehost:8083" }, "tasks": [ { "id": 0, "state": "RUNNING", "worker_id": "fakehost:8083" }, { "id": 1, "state": "FAILED", "worker_id": "fakehost:8083", "trace": "org.apache.kafka.common.errors.RecordTooLargeException\n" } ] } |
...