[
https://issues.apache.org/jira/browse/HDFS-5754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13885944#comment-13885944
]
Brandon Li commented on HDFS-5754:
----------------------------------
{quote} In DataStorage, BPServiceActor and BlockPoolSliceStorage, it should not
compare DATANODE_LAYOUT_VERSION with nsInfo.getLayoutVersion() anymore.{quote}
removed.
{quote} Map<Integer, TreeSet<LayoutFeature>> should be Map<Integer,
Set<LayoutFeature>>. We should declear with interface Set (or should we use
SortedSet?) instead of particular implementation TreeSet.{quote}
yes.
{quote} In PBHelper, could we use null (i.e. unknown) instead of
NodeType.NAME_NODE as default? Or we could add a setStorageType(NodeType)
method so that we could set it when it is null. {quote}
If we use null as default and add new method setStorageType() to set
storageType in a few places after receiving StorageInfo from the wire, the code
is not as clean as just sending StorageType in the RPC payload. But I will
upload a patch with the "default null" first to show the change.
{quote}The type parameter below is not used. Should it be removed?{quote}
yes.
{quote} I suggest to move the layout version related code out from NameNode
and DataNode to new classes, say NameNodeLayoutVersion and
DataNodeLayoutVersion. {quote}
Agree. It's better to hide the maps in these two classes than exposing them
everywhere.
> 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: FeatureInfo.patch, HDFS-5754.001.patch,
> HDFS-5754.002.patch, HDFS-5754.003.patch, HDFS-5754.004.patch,
> HDFS-5754.006.patch, HDFS-5754.007.patch, HDFS-5754.008.patch,
> HDFS-5754.009.patch, HDFS-5754.010.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)