You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/06/21 00:53:30 UTC
[GitHub] merlimat commented on a change in pull request #2004: Issue 1943:
remove serializable from builders and add loadData to load configuration
from a config map
merlimat commented on a change in pull request #2004: Issue 1943: remove serializable from builders and add loadData to load configuration from a config map
URL: https://github.com/apache/incubator-pulsar/pull/2004#discussion_r196984187
##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBuilderImpl.java
##########
@@ -60,12 +59,18 @@
this(client, new ConsumerConfigurationData<T>(), schema);
}
- private ConsumerBuilderImpl(PulsarClientImpl client, ConsumerConfigurationData<T> conf, Schema<T> schema) {
+ ConsumerBuilderImpl(PulsarClientImpl client, ConsumerConfigurationData<T> conf, Schema<T> schema) {
this.client = client;
this.conf = conf;
this.schema = schema;
}
+ @Override
+ public ConsumerBuilder<T> loadConf(Map<String, Object> config) {
+ this.conf = ConfigurationDataUtils.loadData(config, ConsumerConfigurationData.class);
Review comment:
Instead of rewriting from scratch. Would it be possible to override the current `conf` object? This would make make intuitive things like:
`builder.serviceUrl("xxx").loadConf(myMap)`
Maybe it's not super-useful, but it's not evident to me that the above line will disregard the earlier `serviceUrl()` call.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services