Author: stack Date: Tue Mar 4 21:14:55 2014 New Revision: 1574207 URL: http://svn.apache.org/r1574207 Log: HDFS-6047 TestPread NPE inside in DFSInputStream hedgedFetchBlockByteRange (stack)
Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1574207&r1=1574206&r2=1574207&view=diff ============================================================================== --- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Tue Mar 4 21:14:55 2014 @@ -269,6 +269,9 @@ Release 2.4.0 - UNRELEASED HDFS-6053. Fix TestDecommissioningStatus and TestDecommission in branch-2. (jing9) + HDFS-6047 TestPread NPE inside in DFSInputStream hedgedFetchBlockByteRange + (stack) + BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9) Modified: hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java?rev=1574207&r1=1574206&r2=1574207&view=diff ============================================================================== --- hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java (original) +++ hadoop/common/branches/branch-2.4/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java Tue Mar 4 21:14:55 2014 @@ -1177,8 +1177,11 @@ implements ByteBufferReadable, CanSetDro // exception already handled in the call method. getFirstToComplete // will remove the failing future from the list. nothing more to do. } - // We got here if exception. Ignore this node on next go around. - ignored.add(chosenNode.info); + // We got here if exception. Ignore this node on next go around IFF + // we found a chosenNode to hedge read against. + if (chosenNode != null && chosenNode.info != null) { + ignored.add(chosenNode.info); + } } // executed if we get an error from a data node block = getBlockAt(block.getStartOffset(), false);