hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject git commit: HDFS-5089. When a LayoutVersion support SNAPSHOT, it must support FSIMAGE_NAME_OPTIMIZATION.
Date Thu, 16 Oct 2014 03:59:27 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 603293da9 -> aef8dbde9


HDFS-5089. When a LayoutVersion support SNAPSHOT, it must support FSIMAGE_NAME_OPTIMIZATION.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/aef8dbde
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/aef8dbde
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/aef8dbde

Branch: refs/heads/branch-2
Commit: aef8dbde917654c2b27b818f0acff792f341a3de
Parents: 603293d
Author: Tsz-Wo Nicholas Sze <szetszwo@hortonworks.com>
Authored: Wed Oct 15 20:56:59 2014 -0700
Committer: Tsz-Wo Nicholas Sze <szetszwo@hortonworks.com>
Committed: Wed Oct 15 20:58:01 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt          |  3 +++
 .../apache/hadoop/hdfs/protocol/LayoutVersion.java   |  4 ++--
 .../hadoop/hdfs/protocol/TestLayoutVersion.java      | 15 +++++++++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/aef8dbde/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 e313cc3..d81770d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -610,6 +610,9 @@ Release 2.6.0 - UNRELEASED
     HDFS-7208. NN doesn't schedule replication when a DN storage fails.
     (Ming Ma via szetszwo)
 
+    HDFS-5089. When a LayoutVersion support SNAPSHOT, it must support
+    FSIMAGE_NAME_OPTIMIZATION.  (szetszwo)
+
     BREAKDOWN OF HDFS-6134 AND HADOOP-10150 SUBTASKS AND RELATED JIRAS
   
       HDFS-6387. HDFS CLI admin tool for creating & deleting an

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aef8dbde/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
index 760db98..349f72c 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LayoutVersion.java
@@ -107,8 +107,8 @@ public class LayoutVersion {
     RESERVED_REL1_2_0(-41, -32, "Reserved for release 1.2.0", true, CONCAT),
     ADD_INODE_ID(-42, -40, "Assign a unique inode id for each inode", false),
     SNAPSHOT(-43, "Support for snapshot feature"),
-    RESERVED_REL1_3_0(-44, -41,
-        "Reserved for release 1.3.0", true, ADD_INODE_ID, SNAPSHOT),
+    RESERVED_REL1_3_0(-44, -41, "Reserved for release 1.3.0", true,
+    		ADD_INODE_ID, SNAPSHOT, FSIMAGE_NAME_OPTIMIZATION),
     OPTIMIZE_SNAPSHOT_INODES(-45, -43,
         "Reduce snapshot inode memory footprint", false),
     SEQUENTIAL_BLOCK_ID(-46, "Allocate block IDs sequentially and store " +

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aef8dbde/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java
index dbd96bb..bb59a17 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java
@@ -120,4 +120,19 @@ public class TestLayoutVersion {
           NameNodeLayoutVersion.supports(feature, lv));
     }
   }
+  
+  /**
+   * When a LayoutVersion support SNAPSHOT, it must support
+   * FSIMAGE_NAME_OPTIMIZATION.
+   */
+  @Test
+  public void testSNAPSHOT() {
+    for(Feature f : Feature.values()) {
+      final int version = f.getInfo().getLayoutVersion();
+      if (NameNodeLayoutVersion.supports(Feature.SNAPSHOT, version)) {
+        assertTrue(NameNodeLayoutVersion.supports(
+            Feature.FSIMAGE_NAME_OPTIMIZATION, version));
+      }
+    }
+  }
 }


Mime
View raw message