HDFS-7831. Fix the starting index and end condition of the loop in FileDiffList.findEarlierSnapshotBlocks(). Contributed by Konstantin Shvachko.
(cherry picked from commit 73bcfa99af
)
This commit is contained in:
parent
280dda5bcd
commit
8346427929
|
@ -717,6 +717,9 @@ Release 2.7.0 - UNRELEASED
|
|||
HDFS-7008. xlator should be closed upon exit from DFSAdmin#genericRefresh().
|
||||
(ozawa)
|
||||
|
||||
HDFS-7831. Fix the starting index and end condition of the loop in
|
||||
FileDiffList.findEarlierSnapshotBlocks(). (Konstantin Shvachko via jing9)
|
||||
|
||||
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
||||
|
|
|
@ -63,7 +63,7 @@ public class FileDiffList extends
|
|||
List<FileDiff> diffs = this.asList();
|
||||
int i = Collections.binarySearch(diffs, snapshotId);
|
||||
BlockInfoContiguous[] blocks = null;
|
||||
for(i = i >= 0 ? i : -i; i < diffs.size(); i--) {
|
||||
for(i = i >= 0 ? i : -i-2; i >= 0; i--) {
|
||||
blocks = diffs.get(i).getBlocks();
|
||||
if(blocks != null) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue