HDFS-7831. Fix the starting index and end condition of the loop in FileDiffList.findEarlierSnapshotBlocks(). Contributed by Konstantin Shvachko.

This commit is contained in:
Jing Zhao 2015-02-24 10:31:32 -08:00
parent 1aea440560
commit 73bcfa99af
2 changed files with 4 additions and 1 deletions

View File

@ -1017,6 +1017,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

View File

@ -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;