Skip to content

How to use my own dns resolver ??? #2786

@casuallc

Description

@casuallc

QUESTION

There is no way to use my own dns resolver in BookKeeperClient, but I can use it in other places.

Should this in conflict?

// BookKeeperClient.commonInitialization
private synchronized void commonInitialization(
            DistributedLogConfiguration conf,
            String ledgersPath,
            EventLoopGroup eventLoopGroup,
            StatsLogger statsLogger, HashedWheelTimer requestTimer)
        throws IOException, InterruptedException {
// other code ...

Class<? extends DNSToSwitchMapping> dnsResolverCls;
        try {
             dnsResolverCls = conf.getEnsemblePlacementDnsResolverClass();
        } catch (ConfigurationException e) {
            LOG.error("Failed to load bk dns resolver : ", e);
            throw new IOException("Failed to load bk dns resolver : ", e);
        }
        final DNSToSwitchMapping dnsResolver =
                NetUtils.getDNSResolver(dnsResolverCls, conf.getBkDNSResolverOverrides());


// other code ...

}

who can give me a answer of :

  • only DNSResolverForRows or DNSResolverForRacks will returned.
  • if config reppDnsResolverClass is set, my onw dns resolver will be loaded in other places.

dose this in conflict...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions