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

Bharat Viswanadham commented on HDDS-249:
-----------------------------------------

Hi [~hanishakoneru]

Thanks for the review.
 # before calling hddsVolume.getHddsRootDir().listFiles(), there is call for 
format which creates a version file inside hddsDir.  So consider it is 
succeded, the above logic check is fine for us, to safeguard we can add a check 
for name of the file is version file. Consider the format failed to create 
VersionFile, then we return and consider that volume is failed. Because in that 
case, we return false. below is the code for that. if we return false, we add 
to failVolumeMap.

{code:java}
hddsVolume.format(clusterId);
} catch (IOException ex) {
logger.error("Error during formatting volume {}, exception is",
volumeRoot, ex);
return result;
}{code}
2. scmDir check is done here with file exists. So, that scmId matching check is 
not needed here, if above logic holds good.                                     
                                                                                
                                    
{code:java}
else if (!scmDir.exists()) {
// Already existing volume, and this is not first time dn is started
logger.error("Volume {} is in Inconsistent state, missing scm {} " +
"directory", volumeRoot, scmId);
}{code}

> Fail if multiple SCM IDs on the DataNode and add SCM ID check after version 
> request
> -----------------------------------------------------------------------------------
>
>                 Key: HDDS-249
>                 URL: https://issues.apache.org/jira/browse/HDDS-249
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>             Fix For: 0.2.1
>
>         Attachments: HDDS-249.00.patch, HDDS-249.01.patch, HDDS-249.02.patch
>
>
> This Jira take care of following conditions:
>  # If multiple Scm directories exist on datanode, it fails that volume.
>  # validate SCMID response from SCM.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to