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

This commit is contained in:
Xiaoyu Yao 2015-06-16 13:52:50 -07:00
parent c74517c46b
commit 6a76250b39
2 changed files with 8 additions and 1 deletions

View File

@ -900,6 +900,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

View File

@ -198,7 +198,11 @@ boolean removeNode(Block b, DatanodeDescriptor node) {
}
int size() {
return blocks.size();
if (blocks != null) {
return blocks.size();
} else {
return 0;
}
}
Iterable<BlockInfo> getBlocks() {