Skip to content
This repository was archived by the owner on Apr 15, 2024. It is now read-only.
This repository was archived by the owner on Apr 15, 2024. It is now read-only.

ISSUE-2786: How to use my own dns resolver ??? #404

@sijie

Description

@sijie

Original Issue: apache#2786


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