Skip to content

Commit

Permalink
change log level from error to warn when dns resolver initialize fail…
Browse files Browse the repository at this point in the history
…ed (#2856)

Descriptions of the changes in this PR:

### Motivation
When start bookie, it will throws the following error message when dns resolver initialize failed.
```
[main] ERROR org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Failed to initialize DNS Resolver org.apache.bookkeeper.net.ScriptBasedMapping, used default subnet resolver : java.lang.RuntimeException: No network topology script is found when using script based DNS resolver.
```
It is confusing for users.

### Modification
1. change the log level from error to warn.
  • Loading branch information
hangc0276 authored Feb 14, 2022
1 parent 0de75bc commit 4debbbf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public RackawareEnsemblePlacementPolicyImpl initialize(ClientConfiguration conf,
}
} catch (RuntimeException re) {
if (!conf.getEnforceMinNumRacksPerWriteQuorum()) {
LOG.error("Failed to initialize DNS Resolver {}, used default subnet resolver ",
LOG.warn("Failed to initialize DNS Resolver {}, used default subnet resolver ",
dnsResolverName, re);
dnsResolver = new DefaultResolver(this::getDefaultRack);
dnsResolver.setBookieAddressResolver(bookieAddressResolver);
Expand Down

0 comments on commit 4debbbf

Please sign in to comment.