Browse Source

HDFS-4440. Avoid annoying log message when dfs.domain.socket.path is not set. Contributed by Colin Patrick McCabe.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-347@1438280 13f79535-47bb-0310-9956-ffa450edef68
Aaron Myers 12 years ago
parent
commit
c0e16efe91

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt

@@ -37,3 +37,5 @@ HDFS-4417. Fix case where local reads get disabled incorrectly
 HDFS-4433. Make TestPeerCache not flaky (Colin Patrick McCabe via todd)
 
 HDFS-4438. TestDomainSocket fails when system umask is set to 0002. (Colin Patrick McCabe via atm)
+
+HDFS-4440. Avoid annoying log message when dfs.domain.socket.path is not set. (Colin Patrick McCabe via atm)

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java

@@ -84,7 +84,7 @@ class DomainSocketFactory {
   DomainSocket create(InetSocketAddress addr, DFSInputStream stream) {
     // If there is no domain socket path configured, we can't use domain
     // sockets.
-    if (conf.domainSocketPath == null) return null;
+    if (conf.domainSocketPath.isEmpty()) return null;
     // UNIX domain sockets can only be used to talk to local peers
     if (!DFSClient.isLocalAddress(addr)) return null;
     // If the DomainSocket code is not loaded, we can't create