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

Nanda kumar commented on HDFS-12739:
------------------------------------

Thanks [~shashikant] for reporting and working on this, please find my comments 
below

StorageContainerManager:209 
Typo in USAGE  {noformat}"Usage: ozone SCM [" + StartupOption.INIT.getName() + 
" [" + StartupOption.CLUSTERID.getName() + " cid ] [" {noformat}
can be changed to {noformat} "Usage: ozone SCM [" + 
StartupOption.INIT.getName() + " [" + StartupOption.CLUSTERID.getName() + " 
<cid> ] ]" {noformat}

StorageContainerManager:154 The comment is incorrect, we don't have format or 
upgrade options

StorageContainerManager:415 root directory has to be set before calling 
{{scmStorage.analyzeStorage()}}

StorageContainerManager:424 {{clusterId.equals("")}} can be replaced with 
{{clusterId.isEmpty()}}

StorageContainerManager#scmInit javadoc missing

SCMStorage#newClusterID Javadoc is incorrect, it refers to namenode.

Storage:50 {{STORAGE_DIR_CURRENT}} is not required, as it's already defined in 
{{StorageInfo}} which is extended by {{Storage}}

Storage:124 wrong {{InconsistentFSStateException}} is refered.

Storage:128 we don't have to throw {{InconsistentFSStateException}} as it 
extends {{IOException}}

Storage#analyzeStorage returns {{StorageState.NON_EXISTENT}} when root 
directory does not exist, is not a directory or is inaccessible. Even in this 
cases, we are trying to create storage directory which will fail, except for 
the case where root directory doesn't exist which we can create.

StorageInfo#createStorageDir when the storage directory is not empty, instead 
of deleting the content and creating storage directory we can throw an 
exception stating that the directory is not empty.

Since {{hdfs}} script checks {{$1 be "-init"}}, we cannot do {{-genclusterid}}

> Add Support for SCM --init command
> ----------------------------------
>
>                 Key: HDFS-12739
>                 URL: https://issues.apache.org/jira/browse/HDFS-12739
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: HDFS-7240
>    Affects Versions: HDFS-7240
>            Reporter: Shashikant Banerjee
>            Assignee: Shashikant Banerjee
>         Attachments: HDFS-12739-HDFS-7240.001.patch, 
> HDFS-12739-HDFS-7240.002.patch
>
>
> SCM --init command will generate cluster ID and persist it locally. The same 
> cluster Id will be shared with KSM and the datanodes. IF the cluster Id is 
> already available in the locally available version file, it will just read 
> the cluster Id .



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to