HADOOP-15476. fix logging for split-dns multihome . Contributed by Ajay Kumar.

This commit is contained in:
Arpit Agarwal 2018-08-01 12:32:01 -07:00
parent 62cc373dc5
commit c8fbe7921b
1 changed files with 2 additions and 4 deletions

View File

@ -677,7 +677,8 @@ public class Client implements AutoCloseable {
this.socket.setReuseAddress(true); this.socket.setReuseAddress(true);
localAddr = NetUtils.bindToLocalAddress(localAddr, localAddr = NetUtils.bindToLocalAddress(localAddr,
bindToWildCardAddress); bindToWildCardAddress);
LOG.debug("Binding {} to {}", principal, localAddr); LOG.debug("Binding {} to {}", principal,
(bindToWildCardAddress) ? "0.0.0.0" : localAddr);
this.socket.bind(new InetSocketAddress(localAddr, 0)); this.socket.bind(new InetSocketAddress(localAddr, 0));
} }
} }
@ -1281,9 +1282,6 @@ public class Client implements AutoCloseable {
this.bindToWildCardAddress = conf this.bindToWildCardAddress = conf
.getBoolean(CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_KEY, .getBoolean(CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_KEY,
CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_DEFAULT); CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_DEFAULT);
LOG.debug("{} set to true. Will bind client sockets to wildcard "
+ "address.",
CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_KEY);
this.clientId = ClientId.getClientId(); this.clientId = ClientId.getClientId();
this.sendParamsExecutor = clientExcecutorFactory.refAndGetInstance(); this.sendParamsExecutor = clientExcecutorFactory.refAndGetInstance();