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

Yiqun Lin commented on HDFS-12739:
----------------------------------

Thanks for working on this, [~shashikant]. The following are some comments from 
me:

# The usage of {{GENCLUSTERID}} is missing in {{USAGE}}.
# The return value of {{StorageContainerManager#scmInit}} looks confused. Scm 
initial successful, the method return false, if failed, return true. Can we 
make a change on this? And let {{aborted = !scmInit(conf);}}.
# Following line only prints cluster id and no other description, would you 
make a change?
{code}
      private static boolean scmInit(OzoneConfiguration conf) throws 
IOException {
       ...
        if (state != StorageState.NORMAL) {
          try {
            scmStorage.createStorageDir();
            clusterId = StartupOption.INIT.getClusterId();
            if (clusterId == null || clusterId.isEmpty()) {
              //Generate a new cluster id
              clusterId = SCMStorage.newClusterID();
            }
            scmStorage.setClusterID(clusterId);
            scmStorage.writeProperties();
            System.out.println(clusterId);   <=====
            return false;
....
}
{code}
# Here we introduces new scm commands, we need to add some test to verify the 
behaviour of these commands.
Thanks.

> 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
>
>
> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to