apache / bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
https://bookkeeper.apache.org/
Apache License 2.0
1.9k stars 903 forks source link

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

Open casuallc opened 3 years ago

casuallc commented 3 years ago

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 :

dose this in conflict...

jdfrozen commented 3 years ago

请教咋配置RackawareEnsemblePlacementPolicy,有相关的文档嘛,pulsar和bookkeeper的文档不清不楚的