diff --git a/hdfs/CHANGES.txt b/hdfs/CHANGES.txt index f3acf8f448..5cae67db23 100644 --- a/hdfs/CHANGES.txt +++ b/hdfs/CHANGES.txt @@ -1218,6 +1218,9 @@ Release 0.22.0 - Unreleased HDFS-988. saveNamespace race can corrupt the edits log. (eli) + HDFS-2071. Use of isConnected() in DataXceiver is invalid. (Kihwal Lee + via todd) + Release 0.21.1 - Unreleased HDFS-1466. TestFcHdfsSymlink relies on /tmp/test not existing. (eli) diff --git a/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java b/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java index 098f151d4a..76a00d565c 100644 --- a/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java +++ b/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java @@ -178,7 +178,7 @@ public void run() { opStartTime = now(); processOp(op, in); ++opsProcessed; - } while (s.isConnected() && socketKeepaliveTimeout > 0); + } while (!s.isClosed() && socketKeepaliveTimeout > 0); } catch (Throwable t) { LOG.error(datanode.getMachineName() + ":DataXceiver, at " + s.toString(), t);