Repository: hadoop
Updated Branches:
  refs/heads/branch-2 a858d726c -> d9f31c647


HDFS-7517. Remove redundant non-null checks in FSNamesystem#getBlockLocations. 
Contributed by Haohui Mai.


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

Branch: refs/heads/branch-2
Commit: d9f31c6472d6c7264e2d685a058dec3501a73ffd
Parents: a858d72
Author: Haohui Mai <[email protected]>
Authored: Fri Dec 12 11:51:17 2014 -0800
Committer: Haohui Mai <[email protected]>
Committed: Fri Dec 12 11:51:29 2014 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                      | 3 +++
 .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java     | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d9f31c64/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 44946ee..f0e0c62 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -322,6 +322,9 @@ Release 2.7.0 - UNRELEASED
     HDFS-7497. Inconsistent report of decommissioning DataNodes between
     dfsadmin and NameNode webui. (Yongjun Zhang via wang)
 
+    HDFS-7517. Remove redundant non-null checks in FSNamesystem#
+    getBlockLocations. (wheat9)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d9f31c64/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 7f43722..aa7465f 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -1772,10 +1772,6 @@ public class FSNamesystem implements Namesystem, 
FSNamesystemMBean,
 
     logAuditEvent(true, "open", src);
 
-    if (res == null) {
-      return null;
-    }
-
     if (res.updateAccessTime()) {
       writeLock();
       final long now = now();

Reply via email to