HDFS-12363. Possible NPE in BlockManager$StorageInfoDefragmenter#scanAndCompactStorages. Contributed by Xiao Chen
This commit is contained in:
parent
7ecc6dbed6
commit
1fbb662c70
|
@ -4487,8 +4487,12 @@ public class BlockManager implements BlockStatsMXBean {
|
|||
for (int i = 0; i < datanodesAndStorages.size(); i += 2) {
|
||||
namesystem.writeLock();
|
||||
try {
|
||||
DatanodeStorageInfo storage = datanodeManager.
|
||||
getDatanode(datanodesAndStorages.get(i)).
|
||||
final DatanodeDescriptor dn = datanodeManager.
|
||||
getDatanode(datanodesAndStorages.get(i));
|
||||
if (dn == null) {
|
||||
continue;
|
||||
}
|
||||
final DatanodeStorageInfo storage = dn.
|
||||
getStorageInfo(datanodesAndStorages.get(i + 1));
|
||||
if (storage != null) {
|
||||
boolean aborted =
|
||||
|
|
Loading…
Reference in New Issue