[ 
https://issues.apache.org/jira/browse/HDFS-9730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128458#comment-15128458
 ] 

Kihwal Lee commented on HDFS-9730:
----------------------------------

It is reproduced in 2.7 by making following temporary change. 

{code:java}
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNodeLayoutVersion.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNodeLayoutVersion.java
@@ -65,8 +65,9 @@ public static boolean supports(final LayoutFeature f, final 
int lv) {
     FIRST_LAYOUT(-55, -53, "First datanode layout", false),
     BLOCKID_BASED_LAYOUT(-56,
         "The block ID of a finalized block uniquely determines its position " +
-            "in the directory structure");
-   
+            "in the directory structure"),
+    TEST_NEW_LAYOUT(-57, "testing");
+  
     private final FeatureInfo info;
 
     /**
{code}

With [~szetszwo]'s patch ported to 2.7, the failing tests pass.

It looks like trunk has another problem. {{DatanodeStorage.isValidStorageId()}} 
in trunk returns true for the old ID format. This was broken by HDFS-8979.

> Storage ID update does not happen when there is a layout change
> ---------------------------------------------------------------
>
>                 Key: HDFS-9730
>                 URL: https://issues.apache.org/jira/browse/HDFS-9730
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Kihwal Lee
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: h9730_20160202.patch
>
>
> HDFS-9654 will cause test failures when we increment the datanode layout 
> version next time.
> {noformat}
> TestDatanodeStartupFixesLegacyStorageIDs#testUpgradeFrom22via26FixesStorageIDs
> TestDatanodeStartupFixesLegacyStorageIDs#testUpgradeFrom22FixesStorageIDs
> {noformat}
> This is because createStorageID() is no longer called when it goes through 
> the layout upgrade path. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to