hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDFS-8548. Minicluster throws NPE on shutdown. Contributed by surendra singh lilhore.
Date Tue, 16 Jun 2015 21:03:48 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 d2d038b0a -> 8ab23d9ec


HDFS-8548. Minicluster throws NPE on shutdown. Contributed by surendra singh lilhore.

(cherry picked from commit 6a76250b39f33466bdc8dabab33070c90aa1a389)


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

Branch: refs/heads/branch-2
Commit: 8ab23d9ec102ae231987d6fd156e73c15eb8eb6f
Parents: d2d038b
Author: Xiaoyu Yao <xyao@apache.org>
Authored: Tue Jun 16 13:52:50 2015 -0700
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Tue Jun 16 14:00:33 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                    | 3 +++
 .../apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java   | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8ab23d9e/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 dd6aff7..23a202a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -560,6 +560,9 @@ Release 2.8.0 - UNRELEASED
 
     HDFS-8592. SafeModeException never get unwrapped. (wheat9)
 
+    HDFS-8548. Minicluster throws NPE on shutdown.
+    (surendra singh lilhore via xyao)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/8ab23d9e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
index 9eb1059..0dbf485 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java
@@ -198,7 +198,11 @@ class BlocksMap {
   }
 
   int size() {
-    return blocks.size();
+    if (blocks != null) {
+      return blocks.size();
+    } else {
+      return 0;
+    }
   }
 
   Iterable<BlockInfo> getBlocks() {


Mime
View raw message