浏览代码

Merge -r 708709:708710 to move the change log of HADOOP-4526 into branch 0.19

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.19@708711 13f79535-47bb-0310-9956-ffa450edef68
Hairong Kuang 17 年之前
父节点
当前提交
33dc41b183
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 4 2
      CHANGES.txt
  2. 3 0
      src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java

+ 4 - 2
CHANGES.txt

@@ -972,7 +972,7 @@ Release 0.18.2 - Unreleased
     HADOOP-4314. Simulated datanodes should not include blocks that are still
     HADOOP-4314. Simulated datanodes should not include blocks that are still
     being written in their block report. (Raghu Angadi)
     being written in their block report. (Raghu Angadi)
 
 
-    HADOOP-4228. dfs datanoe metrics, bytes_read and bytes_written, overflow
+    HADOOP-4228. dfs datanode metrics, bytes_read and bytes_written, overflow
     due to incorrect type used. (hairong)
     due to incorrect type used. (hairong)
 
 
     HADOOP-4395. The FSEditLog loading is incorrect for the case OP_SET_OWNER.
     HADOOP-4395. The FSEditLog loading is incorrect for the case OP_SET_OWNER.
@@ -992,7 +992,7 @@ Release 0.18.2 - Unreleased
     HADOOP-4469. Rename and add the ant task jar file to the tar file. (nigel)
     HADOOP-4469. Rename and add the ant task jar file to the tar file. (nigel)
 
 
     HADOOP-3914. DFSClient sends Checksum Ok only once for a block. 
     HADOOP-3914. DFSClient sends Checksum Ok only once for a block. 
-    (Christain Kunz via hairong)
+    (Christian Kunz via hairong)
  
  
     HADOOP-4467. SerializationFactory now uses the current context ClassLoader
     HADOOP-4467. SerializationFactory now uses the current context ClassLoader
     allowing for user supplied Serialization instances. (Chris Wensel via
     allowing for user supplied Serialization instances. (Chris Wensel via
@@ -1001,6 +1001,8 @@ Release 0.18.2 - Unreleased
     HADOOP-4517. Release FSDataset lock before joining ongoing create threads.
     HADOOP-4517. Release FSDataset lock before joining ongoing create threads.
     (szetszwo)
     (szetszwo)
  
  
+    HADOOP-4526. fsck failing with NullPointerException. (hairong)
+
   NEW FEATURES
   NEW FEATURES
 
 
     HADOOP-2421.  Add jdiff output to documentation, listing all API
     HADOOP-2421.  Add jdiff output to documentation, listing all API

+ 3 - 0
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java

@@ -172,6 +172,9 @@ public class NamenodeFsck {
     }
     }
     long fileLen = file.getLen();
     long fileLen = file.getLen();
     LocatedBlocks blocks = nn.namesystem.getBlockLocations(path, 0, fileLen);
     LocatedBlocks blocks = nn.namesystem.getBlockLocations(path, 0, fileLen);
+    if (blocks == null) { // the file is deleted
+      return;
+    }
     isOpen = blocks.isUnderConstruction();
     isOpen = blocks.isUnderConstruction();
     if (isOpen && !showOpenFiles) {
     if (isOpen && !showOpenFiles) {
       // We collect these stats about open files to report with default options
       // We collect these stats about open files to report with default options