HDFS-4867. metaSave NPEs when there are invalid blocks in repl queue. Contributed by Plamen Jeliazkov and Ravi Prakash.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1490434 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Konstantin Shvachko 2013-06-06 20:45:56 +00:00
parent 3b08699b2c
commit bbafbced87
2 changed files with 5 additions and 1 deletions

View File

@ -2928,6 +2928,9 @@ Release 0.23.9 - UNRELEASED
BUG FIXES BUG FIXES
HDFS-4867. metaSave NPEs when there are invalid blocks in repl queue.
(Plamen Jeliazkov and Ravi Prakash via shv)
Release 0.23.8 - 2013-06-05 Release 0.23.8 - 2013-06-05
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -458,7 +458,8 @@ public class BlockManager {
numReplicas.decommissionedReplicas(); numReplicas.decommissionedReplicas();
if (block instanceof BlockInfo) { if (block instanceof BlockInfo) {
String fileName = ((BlockInfo)block).getBlockCollection().getName(); BlockCollection bc = ((BlockInfo) block).getBlockCollection();
String fileName = (bc == null) ? "[orphaned]" : bc.getName();
out.print(fileName + ": "); out.print(fileName + ": ");
} }
// l: == live:, d: == decommissioned c: == corrupt e: == excess // l: == live:, d: == decommissioned c: == corrupt e: == excess