From c0e16efe91a5de374a55e272ee97d568def60b6b Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Fri, 25 Jan 2013 00:44:37 +0000 Subject: [PATCH] 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 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt | 2 ++ .../main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt index b067e0c106..faf82389ce 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt +++ b/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) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java index 103c946e5e..69a6416dfc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java @@ -84,7 +84,7 @@ public DomainSocketFactory(Conf conf) { 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