Fix NPE in LazyPersistFileScrubber. Contributed by Inigo Goiri.
(cherry picked from commit 303c8dc9b6c853c0939ea9ba14388897cc258071)
This commit is contained in:
parent
3c0eb9c415
commit
e336d92b99
@ -3838,11 +3838,15 @@ private void clearCorruptLazyPersistFiles()
|
||||
while (it.hasNext()) {
|
||||
Block b = it.next();
|
||||
BlockInfo blockInfo = blockManager.getStoredBlock(b);
|
||||
if (blockInfo == null) {
|
||||
LOG.info("Cannot find block info for block " + b);
|
||||
} else {
|
||||
BlockCollection bc = getBlockCollection(blockInfo);
|
||||
if (bc.getStoragePolicyID() == lpPolicy.getId()) {
|
||||
filesToDelete.add(bc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (BlockCollection bc : filesToDelete) {
|
||||
LOG.warn("Removing lazyPersist file " + bc.getName() + " with no replicas.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user