Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Pause and resume commands use HTTP POST instead of PUT #21

Closed
56quarters opened this issue Feb 8, 2017 · 4 comments
Closed

Pause and resume commands use HTTP POST instead of PUT #21

56quarters opened this issue Feb 8, 2017 · 4 comments

Comments

@56quarters
Copy link
Contributor

Hi there,

First off, great project, thanks so much for creating it.

I noticed that pause and resume commands are using POST when talking to the Kafka Connect REST API instead of PUT

Specifically, these methods should be using PUT:

https://github.com/datamountaineer/kafka-connect-tools/blob/master/src/main/scala/com/datamountaineer/connect/tools/RestKafkaConnectApi.scala#L198

https://github.com/datamountaineer/kafka-connect-tools/blob/master/src/main/scala/com/datamountaineer/connect/tools/RestKafkaConnectApi.scala#L206

This is the result printed from the Connect Worker:

[2017-02-08 17:09:54,503] INFO 127.0.0.1 - - [08/Feb/2017:22:09:54 +0000] "POST /connectors/sqlserver-test-sink/pause HTTP/1.1" 405 323  2 (org.apache.kafka.connect.runtime.rest.RestServer:60)

Note the HTTP 405 response.

The API for these is specified here:

http://docs.confluent.io/3.1.2/connect/restapi.html#put--connectors-(string-name)-pause

I can submit a PR for these changes if you'd like. Thanks!

@andrewstevenson
Copy link
Contributor

@56quarters Great, PRs welcome!

@andrewstevenson
Copy link
Contributor

@56quarters Do you want to cover #20 aswell?

@56quarters
Copy link
Contributor Author

I can submit a PR for this issue and I'll see what I can do for #20. I'll do them as separate commits / PRs if I make any progress on the latter.

@56quarters
Copy link
Contributor Author

I decided to only fix #21, not #20. I think #20 requires some judgement about the best way to do that and didn't feel like I could make that decision. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants