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 @@ void scheduleBlockReport(long delay) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reportBadBlocks(ExtendedBlock block) {
|
void reportBadBlocks(ExtendedBlock block) {
|
||||||
|
if (bpRegistration == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
DatanodeInfo[] dnArr = { new DatanodeInfo(bpRegistration) };
|
DatanodeInfo[] dnArr = { new DatanodeInfo(bpRegistration) };
|
||||||
LocatedBlock[] blocks = { new LocatedBlock(block, dnArr) };
|
LocatedBlock[] blocks = { new LocatedBlock(block, dnArr) };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user