Repository: hadoop Updated Branches: refs/heads/branch-2 280dda5bc -> 834642792
HDFS-7831. Fix the starting index and end condition of the loop in FileDiffList.findEarlierSnapshotBlocks(). Contributed by Konstantin Shvachko. (cherry picked from commit 73bcfa99af61e5202f030510db8954c17cba43cc) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/83464279 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/83464279 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/83464279 Branch: refs/heads/branch-2 Commit: 8346427929d2b6f2fd3fa228d77f3cf596ef0306 Parents: 280dda5 Author: Jing Zhao <[email protected]> Authored: Tue Feb 24 10:31:32 2015 -0800 Committer: Jing Zhao <[email protected]> Committed: Tue Feb 24 10:34:42 2015 -0800 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/83464279/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7427f81..37c6705 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -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 http://git-wip-us.apache.org/repos/asf/hadoop/blob/83464279/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java index f9f5056..0c94554 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FileDiffList.java @@ -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;
