HDFS-3332. NullPointerException in DN when directoryscanner is trying to report bad blocks. Contributed by Amith D K.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1333587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
48414b0827
commit
9aae7c22ac
|
@ -235,6 +235,9 @@ class BPServiceActor implements Runnable {
|
|||
}
|
||||
|
||||
void reportBadBlocks(ExtendedBlock block) {
|
||||
if (bpRegistration == null) {
|
||||
return;
|
||||
}
|
||||
DatanodeInfo[] dnArr = { new DatanodeInfo(bpRegistration) };
|
||||
LocatedBlock[] blocks = { new LocatedBlock(block, dnArr) };
|
||||
|
||||
|
|
Loading…
Reference in New Issue