-
Notifications
You must be signed in to change notification settings - Fork 433
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
MINOR: clean up and add getters to config #445
Conversation
Signed-off-by: Lev Zemlyanov <lev@confluent.io>
).define( | ||
CONNECTION_PASSWORD_CONFIG, | ||
Type.PASSWORD, | ||
CONNECTION_PASSWORD_DEFAULT, |
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.
Should this have a default? or should it be defined with Importance.HIGH
as a required config?
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.
this is not a required config
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.
Thanks for the cleanup @levzem! Few questions.
One note for ES as a future improvement (not this PR) would be more integration test coverage around edge cases/negative paths, it seems to be behind compared to some of our other connectors.
return getString(TYPE_NAME_CONFIG); | ||
} | ||
|
||
public Set<String> urls() { |
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.
It would be great if we could use a more descriptive name for this getter, ex. connectionUrls
. Let's also make sure getList
doesn't eliminate duplicates already.
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.
it doesn't
return getBoolean(COMPACT_MAP_ENTRIES_CONFIG); | ||
} | ||
|
||
private Map<String, String> parseMapConfig(List<String> values) { |
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.
What is this used for in this repo? First time I see this logic in connector configs.
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.
TOPIC_INDEX_MAP_CONFIG
/ topicIndexMap()
Signed-off-by: Lev Zemlyanov <lev@confluent.io>
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.
LGTM
Signed-off-by: Lev Zemlyanov lev@confluent.io
Problem
connector does not use config getters which is not the best practice and ends up with some clunky code
Solution
add config getters and reorganize config class
Does this solution apply anywhere else?
If yes, where?
Test Strategy
ensure all previous tests pass
Testing done:
Release Plan
backport to
5.0.x
to reduce pint merge conflicts in future PRs