[
https://issues.apache.org/jira/browse/HDFS-12739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16235615#comment-16235615
]
Nanda kumar commented on HDFS-12739:
------------------------------------
Thanks [~shashikant] for updating the patch. Overall it looks good to me, so
minor comments.
hdfs:223 {{if [ "$#" -gt 0 ] && [ "$1" != "-init" ] && [ "$1" !=
"-genclusterid" ]}} appending too many condition makes it look complex,
refactoring this is handled as part of HDFS-12588 - FYI, no need to do anything
in current jira.
OzoneConsts:154-155 Naming suggestion - {{KSM_NODE}} to {{KSM}} and
{{SCM_NODE}} to {{SCM}}
StorageInfo#setPropertiesFromFields
* We should do {{Preconditions.checkNotNull(storageType)}} and
{{Preconditions.checkNotNull(clusterID)}}
* {{storageType}}, {{clusterID}} and {{cTime}} can be declared as final static
variables and used.
Storage:125 It has to be {{currentDir}} instead of {{getRootDir()}} in
exception message.
Storage#checkEmptyCurrent Suggestion - Exception message can be rephrased to
{{Can't initialize the storage directory because it is not empty.}}, since we
are already printing the directory path, it should make sense.
Storage:175 Typo in {{storage}}
Storage:229 {{clusterID}} should refer to {{StorageInfo.CLUSTER_ID}} final
static variable
In {{SCMStorage}}, rootDir and storageDir can be set as part of constructor
instead of static setters
SCMStorage:39 {{SCMuuid}} should be {{scmUuid}}
SCMStorage:61 {{SCMuuid}} can be declared as final static variable and used.
StorageContainerManager:208 & 209 we don't have script called {{ozone}} to
start SCM, so as of now we should use {{hdfs}} here.
StorageContainerManager#scmInit javadoc for return type will be helpful,
something like {{true if SCM initialization is successful, false otherwise.}}
StorageContainerManager#init If this is used only for unit testing, we should
add {{@VisibleForTesting}}
TestStorageContainerManager:296
{{Assert.assertTrue(clusterId.equals("testClusterId"))}} can be changed to
{{Assert.assertEquals("testClusterId", clusterId)}}
TestStorageContainerManager:304 Assert is done for the same value
{{Assert.assertTrue(clusterId.equals(clusterId))}}, which will always pass. It
should be {{Assert.assertEquals(clusterId, cid)}}
> 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
> Priority: Major
> Attachments: HDFS-12739-HDFS-7240.001.patch,
> HDFS-12739-HDFS-7240.002.patch, HDFS-12739-HDFS-7240.003.patch,
> HDFS-12739-HDFS-7240.004.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]