From f2e29acbfa0b7e1fcecbdcf3e791c96114b456a5 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Wed, 1 Aug 2018 12:32:01 -0700 Subject: [PATCH] HADOOP-15476. fix logging for split-dns multihome . Contributed by Ajay Kumar. --- .../src/main/java/org/apache/hadoop/ipc/Client.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java index 163e80dfc40..e1470483d63 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Client.java @@ -677,7 +677,8 @@ public class Client implements AutoCloseable { this.socket.setReuseAddress(true); localAddr = NetUtils.bindToLocalAddress(localAddr, 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)); } } @@ -1281,9 +1282,6 @@ public class Client implements AutoCloseable { this.bindToWildCardAddress = conf .getBoolean(CommonConfigurationKeys.IPC_CLIENT_BIND_WILDCARD_ADDR_KEY, 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.sendParamsExecutor = clientExcecutorFactory.refAndGetInstance();