-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: connector moves and renames #110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok, but we will need a follow-up PR to move some of the other classes into more sensible packages too.
A couple of suggestions from me, but I think Tom has some similar thoughts and will probably give more detail.
@@ -20,12 +20,12 @@ | |||
|
|||
import java.util.Map; | |||
|
|||
public class CloudantSinkConnectorConfig extends CloudantConnectorConfig { | |||
public class CloudantSinkConnectorConfig extends ConnectorConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably drop the Cloudant prefix from all the Sink
classes it is implicit in the package name and will give better "symmetry" with the Source connectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean renaming CloudantSinkConnector
to SinkConnector
too? The problem is there's a kafka class (that this sink connector implements) named SinkConnector
too: public class SinkConnector extends org.apache.kafka.connect.sink.SinkConnector
should not that confuse our users?
CC @tomblench
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - personally I don't mind the name clash. Users will generally only ever use this name when they configure the connector, where they have to give the fully qualified name, eg
connector.class=com.ibm.cloud.cloudant.kafka.SinkConnector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready in 3c79671
@@ -11,10 +11,14 @@ | |||
* either express or implied. See the License for the specific language governing permissions | |||
* and limitations under the License. | |||
*/ | |||
package com.ibm.cloud.cloudant.kafka.connect; | |||
package com.ibm.cloud.cloudant.kafka.connect.connectors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at this again it does seem a bit over-long especially as it needs entering into config.
Maybe we should drop one of hte levels here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @tomblench suggested, I will put them on the level com.ibm.cloud.cloudant.kafka
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I would suggest three tweaks:
In summary: |
c1c10fb
to
37371b0
Compare
This is done in 8bf0292 and tests are moved up in 59772b2
I have not touched this yet, because of an ongoing conversation here: #110 (comment)
This is fixed in 59772b2 |
Thanks for the reviews @tomblench and @ricellis! I've also added a line to the |
ada7563
to
88827ed
Compare
Checklist
CHANGES.md
|CHANGELOG.md
) or test/build only changesDescription
Related to #96
Approach
Renames under the
src/main/java/com/ibm/cloud/cloudant/kafka/
path:Renames under the
src/test/java/com/ibm/cloud/cloudant/kafka/
path:I also refactored the references in other files to reflect the new class/file/package names.
Schema & API Changes
Security and Privacy
Testing
Monitoring and Logging