jerrypeng commented on a change in pull request #6964:
URL: https://github.com/apache/pulsar/pull/6964#discussion_r425970662
##########
File path:
pulsar-io/twitter/src/main/java/org/apache/pulsar/io/twitter/TwitterFireHose.java
##########
@@ -72,7 +72,8 @@
@Override
public void open(Map<String, Object> config, SourceContext sourceContext)
throws IOException {
- TwitterFireHoseConfig hoseConfig =
IOConfigUtils.loadWithSecrets(config, TwitterFireHoseConfig.class,
sourceContext);
+ TwitterFireHoseConfig hoseConfigWithoutSecrets =
TwitterFireHoseConfig.load(config);
Review comment:
> Connectors can construct their config class in any manner they choose
to. Mapping from the the Map<String, Object> using object factory is just one
way of doing this.
Sure, but I would say the most common pattern would be the existing one.
Most, if not all connectors, will load a config class from a map where there is
a one to one mapping of class field to key. I think it would be extremely
uncommon for a connector not to follow that pattern and have some custom
mapping scheme implemented. At most I would recommend just adding a helper
method "IOConfigUtils.fillWithSecrets" that allows developers to do the
"filling" of secrets separately if they want but I wouldn't recommend changing
the paradigm for every connector.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]