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

Tsz Wo (Nicholas), SZE commented on HDFS-5754:
----------------------------------------------

Thanks Brandon for updating the patch.  Some comments

- The patch changes some pre-rolling upgrade version check to use 
NameNode.layoutVersion.supports(..) instead of LayoutVersion.supports(..) such 
as below.  Some of the changes are in the common code of DN and NN, and some of 
the changes are in datanode code.  These changes are incorrect since DN should 
not use NameNode.layoutVersion.
-* e.g 1
{code}
//Storage.java
-    if (LayoutVersion.supports(Feature.FEDERATION, layoutVersion)) {
+    if (NameNode.layoutVersion.supports(Feature.FEDERATION, layoutVersion)) {
{code}
-* e.g. 2
{code}
//datanode/BlockPoolSliceStorage.java
-    if (!LayoutVersion.supports(Feature.FEDERATION, layoutVersion)) {
+    if (!NameNode.layoutVersion.supports(Feature.FEDERATION, layoutVersion)) {
{code}
I subject we keep the static LayoutVersion.supports(..) method and revert all 
the changes from LayoutVersion.supports(..) to 
NameNode.layoutVersion.supports(..). 

> Split LayoutVerion into NamenodeLayoutVersion and DatanodeLayoutVersion 
> ------------------------------------------------------------------------
>
>                 Key: HDFS-5754
>                 URL: https://issues.apache.org/jira/browse/HDFS-5754
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Brandon Li
>         Attachments: HDFS-5754.001.patch, HDFS-5754.002.patch, 
> HDFS-5754.003.patch, HDFS-5754.004.patch, HDFS-5754.006.patch, 
> HDFS-5754.007.patch
>
>
> Currently, LayoutVersion defines the on-disk data format and supported 
> features of the entire cluster including NN and DNs.  LayoutVersion is 
> persisted in both NN and DNs.  When a NN/DN starts up, it checks its 
> supported LayoutVersion against the on-disk LayoutVersion.  Also, a DN with a 
> different LayoutVersion than NN cannot register with the NN.
> We propose to split LayoutVersion into two independent values that are local 
> to the nodes:
> - NamenodeLayoutVersion - defines the on-disk data format in NN, including 
> the format of FSImage, editlog and the directory structure.
> - DatanodeLayoutVersion - defines the on-disk data format in DN, including 
> the format of block data file, metadata file, block pool layout, and the 
> directory structure.  
> The LayoutVersion check will be removed in DN registration.  If 
> NamenodeLayoutVersion or DatanodeLayoutVersion is changed in a rolling 
> upgrade, then only rollback is supported and downgrade is not.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to