diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt index ad9e4abd43..1289d9e21a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt @@ -17,3 +17,5 @@ HDFS-4388. DomainSocket should throw AsynchronousCloseException when appropriate HDFS-4390. Bypass UNIX domain socket unit tests when they cannot be run. (Colin Patrick McCabe via todd) +HDFS-4400. DFSInputStream#getBlockReader: last retries should ignore the cache +(Colin Patrick McCabe via todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java index a33f8f54e7..0f4b7e350f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java @@ -941,7 +941,7 @@ protected BlockReader getBlockReader(InetSocketAddress dnAddr, // equivalent to declaring the DataNode bad. boolean triedNonDomainSocketReader = false; for (int retries = 0; - retries < nCachedConnRetry && (!triedNonDomainSocketReader); + retries < nCachedConnRetry || (!triedNonDomainSocketReader); ++retries) { Peer peer = null; if (retries < nCachedConnRetry) {