hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hadoop git commit: HDFS-8894. Set SO_KEEPALIVE on DN server sockets. Contributed by Kanaka Kumar Avvaru.
Date Tue, 15 Dec 2015 22:40:36 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 f22d0046d -> 8e5de6cc4


HDFS-8894. Set SO_KEEPALIVE on DN server sockets. Contributed by Kanaka Kumar Avvaru.

(cherry picked from commit 49949a4bb03aa81cbb9115e91ab1c61cc6dc8a62)
(cherry picked from commit 2796c1099f5c770d534f4bf10c1d80886d0bc194)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8e5de6cc
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8e5de6cc
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8e5de6cc

Branch: refs/heads/branch-2.8
Commit: 8e5de6cc42a72c90207088f71abcde29d5f93ebb
Parents: f22d004
Author: Andrew Wang <wang@apache.org>
Authored: Tue Dec 15 14:38:35 2015 -0800
Committer: Andrew Wang <wang@apache.org>
Committed: Tue Dec 15 14:40:23 2015 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hdfs/DataStreamer.java       | 1 +
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java | 4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e5de6cc/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
index a116125..b406c67 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DataStreamer.java
@@ -139,6 +139,7 @@ class DataStreamer extends Daemon {
     NetUtils.connect(sock, isa, client.getRandomLocalInterfaceAddr(),
         conf.getSocketTimeout());
     sock.setSoTimeout(timeout);
+    sock.setKeepAlive(true);
     if (conf.getSocketSendBufferSize() > 0) {
       sock.setSendBufferSize(conf.getSocketSendBufferSize());
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e5de6cc/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index cf6c638..aee4def 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -856,6 +856,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9514. TestDistributedFileSystem.testDFSClientPeerWriteTimeout failing;
     exception being swallowed. (Wei-Chiu Chuang via Yongjun Zhang)
 
+    HDFS-8894. Set SO_KEEPALIVE on DN server sockets.
+    (Kanaka Kumar Avvaru via wang)
+
   OPTIMIZATIONS
 
     HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8e5de6cc/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
index e463508..8220d6c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java
@@ -710,6 +710,7 @@ class DataXceiver extends Receiver implements Runnable {
               (HdfsConstants.WRITE_TIMEOUT_EXTENSION * targets.length);
           NetUtils.connect(mirrorSock, mirrorTarget, timeoutValue);
           mirrorSock.setSoTimeout(timeoutValue);
+          mirrorSock.setKeepAlive(true);
           if (dnConf.getTransferSocketSendBufferSize() > 0) {
             mirrorSock.setSendBufferSize(
                 dnConf.getTransferSocketSendBufferSize());
@@ -1127,7 +1128,8 @@ class DataXceiver extends Receiver implements Runnable {
         proxySock = datanode.newSocket();
         NetUtils.connect(proxySock, proxyAddr, dnConf.socketTimeout);
         proxySock.setSoTimeout(dnConf.socketTimeout);
-        
+        proxySock.setKeepAlive(true);
+
         OutputStream unbufProxyOut = NetUtils.getOutputStream(proxySock,
             dnConf.socketWriteTimeout);
         InputStream unbufProxyIn = NetUtils.getInputStream(proxySock);


Mime
View raw message