hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject hadoop git commit: HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). Contributed by Byron Wong.
Date Fri, 16 Jan 2015 22:32:24 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk ec4389cf7 -> 60cbcff2f


HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). Contributed by Byron Wong.

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

Branch: refs/heads/trunk
Commit: 60cbcff2f7363e5cc386284981cac67abc965ee7
Parents: ec4389c
Author: Konstantin V Shvachko <shv@apache.org>
Authored: Fri Jan 16 14:31:18 2015 -0800
Committer: Konstantin V Shvachko <shv@apache.org>
Committed: Fri Jan 16 14:31:18 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                        | 2 ++
 .../java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/60cbcff2/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 8e2872c..6af1a52 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -270,6 +270,8 @@ Trunk (Unreleased)
 
     HDFS-7581. HDFS documentation needs updating post-shell rewrite (aw)
 
+    HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). (Byron Wong via shv)
+
 Release 2.7.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/60cbcff2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
index 64887e6..e871bdc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
@@ -432,7 +432,7 @@ public class INodeFile extends INodeWithAdditionalFields
       return snapshotBlocks;
     // Blocks are not in the current snapshot
     // Find next snapshot with blocks present or return current file blocks
-    snapshotBlocks = getDiffs().findLaterSnapshotBlocks(diff.getSnapshotId());
+    snapshotBlocks = getDiffs().findLaterSnapshotBlocks(snapshot);
     return (snapshotBlocks == null) ? getBlocks() : snapshotBlocks;
   }
 


Mime
View raw message