You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/09/08 06:14:12 UTC

[GitHub] [bookkeeper] lhotari commented on a change in pull request #2788: fix-npe-when-pulsar-ZkBookieRackAffinityMapping-getBookieAddressResolver

lhotari commented on a change in pull request #2788:
URL: https://github.com/apache/bookkeeper/pull/2788#discussion_r704077734



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicyImpl.java
##########
@@ -256,10 +256,14 @@ public RackawareEnsemblePlacementPolicyImpl initialize(ClientConfiguration conf,
         DNSToSwitchMapping dnsResolver;
         if (optionalDnsResolver.isPresent()) {
             dnsResolver = optionalDnsResolver.get();
+            dnsResolver.setBookieAddressResolver(bookieAddressResolver);
         } else {
             String dnsResolverName = conf.getString(REPP_DNS_RESOLVER_CLASS, ScriptBasedMapping.class.getName());
             try {
                 dnsResolver = ReflectionUtils.newInstance(dnsResolverName, DNSToSwitchMapping.class);
+                if (dnsResolver != null) {

Review comment:
       is there some way how dnsResolver could be null here?




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org