hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1445491 - in /hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs: CHANGES.HDFS-347.txt src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
Date Wed, 13 Feb 2013 07:26:43 GMT
Author: todd
Date: Wed Feb 13 07:26:42 2013
New Revision: 1445491

URL: http://svn.apache.org/r1445491
Log:
HDFS-4496. DFSClient: don't create a domain socket unless we need it. Contributed by Colin
Patrick McCabe.

Modified:
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt?rev=1445491&r1=1445490&r2=1445491&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt (original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt Wed
Feb 13 07:26:42 2013
@@ -45,3 +45,5 @@ HDFS-4473. Don't create domain socket un
 HDFS-4485. DN should chmod socket path a+w. (Colin Patrick McCabe via atm)
 
 HDFS-4453. Make a simple doc to describe the usage and design of the shortcircuit read feature.
(Colin Patrick McCabe via atm)
+
+HDFS-4496. DFSClient: don't create a domain socket unless we need it (Colin Patrick McCabe
via todd)

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java?rev=1445491&r1=1445490&r2=1445491&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
(original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
Wed Feb 13 07:26:42 2013
@@ -85,6 +85,10 @@ class DomainSocketFactory {
     // If there is no domain socket path configured, we can't use domain
     // sockets.
     if (conf.domainSocketPath.isEmpty()) return null;
+    // If we can't do anything with the domain socket, don't create it.
+    if (!(conf.domainSocketDataTraffic || conf.shortCircuitLocalReads)) {
+      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



Mime
View raw message