HDFS-16357. Fix log format in DFSUtilClient (#3729). Contributed by guophilipse.

Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
GuoPhilipse 2021-12-04 21:05:05 +08:00 committed by GitHub
parent cab7086fbc
commit 2f55a6cced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -733,13 +733,13 @@ public static boolean isLocalAddress(InetSocketAddress targetAddr)
InetAddress addr = targetAddr.getAddress(); InetAddress addr = targetAddr.getAddress();
Boolean cached = localAddrMap.get(addr.getHostAddress()); Boolean cached = localAddrMap.get(addr.getHostAddress());
if (cached != null) { if (cached != null) {
LOG.trace("Address {} is {} local", targetAddr, (cached ? "" : "not")); LOG.trace("Address {} is{} local", targetAddr, (cached ? "" : " not"));
return cached; return cached;
} }
boolean local = NetUtils.isLocalAddress(addr); boolean local = NetUtils.isLocalAddress(addr);
LOG.trace("Address {} is {} local", targetAddr, (local ? "" : "not")); LOG.trace("Address {} is{} local", targetAddr, (local ? "" : " not"));
localAddrMap.put(addr.getHostAddress(), local); localAddrMap.put(addr.getHostAddress(), local);
return local; return local;
} }