[
https://issues.apache.org/jira/browse/HDFS-7035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849804#comment-15849804
]
Kanaka Kumar Avvaru commented on HDFS-7035:
-------------------------------------------
The following code in the patch is a dead code now as "initialized" is false
and never set to true.
{code}
+ if (this.initialized) {
+ LOG.info("DataNode version: " + HdfsConstants.DATANODE_LAYOUT_VERSION
+ + " and NameNode layout version: " + nsInfo.getLayoutVersion());
+ this.storageDirs = new ArrayList<StorageDirectory>(dataDirs.size());
+ // mark DN storage is initialized
+ this.initialized = true;
{code}
IIUC , {{recoverTransitionRead}} is called only once after DN started during
block pool initialization. So can we remove {{initialized}} flag & this
unused code ?
> Make adding a new data directory to the DataNode an atomic operation and
> improve error handling
> -----------------------------------------------------------------------------------------------
>
> Key: HDFS-7035
> URL: https://issues.apache.org/jira/browse/HDFS-7035
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode
> Affects Versions: 2.5.0
> Reporter: Lei (Eddy) Xu
> Assignee: Lei (Eddy) Xu
> Labels: 2.6.1-candidate
> Fix For: 2.7.0, 2.6.1, 3.0.0-alpha1
>
> Attachments: HDFS-7035.000.combo.patch, HDFS-7035.000.patch,
> HDFS-7035.001.combo.patch, HDFS-7035.001.patch, HDFS-7035.002.patch,
> HDFS-7035.003.patch, HDFS-7035.003.patch, HDFS-7035.004.patch,
> HDFS-7035.005.patch, HDFS-7035.007.patch, HDFS-7035.008.patch,
> HDFS-7035.009.patch, HDFS-7035.010.patch, HDFS-7035.010.patch,
> HDFS-7035.011.patch, HDFS-7035.012.patch, HDFS-7035.013.patch,
> HDFS-7035.014.patch, HDFS-7035.015.patch, HDFS-7035.016.patch
>
>
> It refactors {{DataStorage}} and {{BlockPoolSliceStorage}} to reduce the
> duplicate code and supports atomic adding volume operations. Also it
> parallels loading data volume operation: each thread loads one volume.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]