HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). Contributed by Byron Wong.
This commit is contained in:
parent
ec4389cf72
commit
60cbcff2f7
@ -270,6 +270,8 @@ Trunk (Unreleased)
|
||||
|
||||
HDFS-7581. HDFS documentation needs updating post-shell rewrite (aw)
|
||||
|
||||
HDFS-7606. Fix potential NPE in INodeFile.getBlocks(). (Byron Wong via shv)
|
||||
|
||||
Release 2.7.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -432,7 +432,7 @@ public BlockInfo[] getBlocks(int snapshot) {
|
||||
return snapshotBlocks;
|
||||
// Blocks are not in the current snapshot
|
||||
// Find next snapshot with blocks present or return current file blocks
|
||||
snapshotBlocks = getDiffs().findLaterSnapshotBlocks(diff.getSnapshotId());
|
||||
snapshotBlocks = getDiffs().findLaterSnapshotBlocks(snapshot);
|
||||
return (snapshotBlocks == null) ? getBlocks() : snapshotBlocks;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user