Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11270

Document the missing options of NameNode bootstrap command

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: documentation
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently there are missing three options introduction in HDFSCommands.md of command hdfs namenode [-bootstrapStandby]. Now this command can support -force, -nonInteractive and a additional option -skipSharedEditsCheck. It will be better to document what's the meaning of these options and that will let users know how to use it correctly.

      1. HDFS-11270.001.patch
        4 kB
        Yiqun Lin
      2. HDFS-11270.002.patch
        3 kB
        Yiqun Lin
      3. HDFS-11270.003.patch
        5 kB
        Yiqun Lin

        Activity

        Hide
        linyiqun Yiqun Lin added a comment - - edited

        Attach a patch for this. Gentlely ping Akira Ajisaka, could you please help see again, it's similar to the JIRA HDFS-11204, . Thanks.

        Show
        linyiqun Yiqun Lin added a comment - - edited Attach a patch for this. Gentlely ping Akira Ajisaka , could you please help see again, it's similar to the JIRA HDFS-11204 , . Thanks.
        Hide
        liuml07 Mingliang Liu added a comment -

        Thanks Yiqun Lin. I think the patch is good overall.

        One minor comment is about

        -skipSharedEditsCheck option skips edits check, the edits check can ensure we have enough edits already in the shared directory to start up, otherwise it will aborts the download of fsimage file from active namenode.

        It'd be better to have two sentences as "otherwise" case is not very straightforward. And perhaps we don't have to mention the implementation detail of downloading fsimage from active namenode; it also skips the possible upgrade. How about:

        -skipSharedEditsCheck option skips edits check which ensures that we have enough edits already in the shared directory to start up from the last checkpoint on the active.

        Show
        liuml07 Mingliang Liu added a comment - Thanks Yiqun Lin . I think the patch is good overall. One minor comment is about -skipSharedEditsCheck option skips edits check, the edits check can ensure we have enough edits already in the shared directory to start up, otherwise it will aborts the download of fsimage file from active namenode. It'd be better to have two sentences as "otherwise" case is not very straightforward. And perhaps we don't have to mention the implementation detail of downloading fsimage from active namenode; it also skips the possible upgrade. How about: -skipSharedEditsCheck option skips edits check which ensures that we have enough edits already in the shared directory to start up from the last checkpoint on the active.
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Mingliang Liu for the review. The comment makes sense for me. New patch attached.

        Show
        linyiqun Yiqun Lin added a comment - Thanks Mingliang Liu for the review. The comment makes sense for me. New patch attached.
        Hide
        liuml07 Mingliang Liu added a comment - - edited

        +1 pending on Jenkins.

        Akira Ajisaka, if you don't have further comments, I'll commit this next week. Thanks,

        Show
        liuml07 Mingliang Liu added a comment - - edited +1 pending on Jenkins. Akira Ajisaka , if you don't have further comments, I'll commit this next week. Thanks,
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 12m 47s trunk passed
        +1 compile 0m 47s trunk passed
        +1 checkstyle 0m 26s trunk passed
        +1 mvnsite 0m 54s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 42s trunk passed
        +1 javadoc 0m 40s trunk passed
        +1 mvninstall 0m 47s the patch passed
        +1 compile 0m 48s the patch passed
        +1 javac 0m 48s the patch passed
        +1 checkstyle 0m 25s the patch passed
        +1 mvnsite 0m 53s the patch passed
        +1 mvneclipse 0m 11s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 57s the patch passed
        +1 javadoc 0m 39s the patch passed
        +1 unit 70m 42s hadoop-hdfs in the patch passed.
        +1 asflicense 0m 19s The patch does not generate ASF License warnings.
        95m 50s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HDFS-11270
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844500/HDFS-11270.002.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 3a7697633704 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 22befbd
        Default Java 1.8.0_111
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17941/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17941/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 12m 47s trunk passed +1 compile 0m 47s trunk passed +1 checkstyle 0m 26s trunk passed +1 mvnsite 0m 54s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 42s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 47s the patch passed +1 compile 0m 48s the patch passed +1 javac 0m 48s the patch passed +1 checkstyle 0m 25s the patch passed +1 mvnsite 0m 53s the patch passed +1 mvneclipse 0m 11s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 57s the patch passed +1 javadoc 0m 39s the patch passed +1 unit 70m 42s hadoop-hdfs in the patch passed. +1 asflicense 0m 19s The patch does not generate ASF License warnings. 95m 50s Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11270 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844500/HDFS-11270.002.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 3a7697633704 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 22befbd Default Java 1.8.0_111 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17941/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17941/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        brahmareddy Brahma Reddy Battula added a comment -

        Yiqun Lin thanks for working on this...

        1) I am thinking ,we should update at following like namenode format which will make more sense..?.

        org.apache.hadoop.hdfs.server.namenode.NameNode#USAGE.

          private static final String USAGE = "Usage: hdfs namenode ["
              + StartupOption.BACKUP.getName() + "] | \n\t["
              + StartupOption.CHECKPOINT.getName() + "] | \n\t["
              + StartupOption.FORMAT.getName() + " ["
              + StartupOption.CLUSTERID.getName() + " cid ] ["
              + StartupOption.FORCE.getName() + "] ["
              + StartupOption.NONINTERACTIVE.getName() + "] ] | \n\t["
              + StartupOption.UPGRADE.getName() + 
                " [" + StartupOption.CLUSTERID.getName() + " cid]" +
                " [" + StartupOption.RENAMERESERVED.getName() + "<k-v pairs>] ] | \n\t["
              + StartupOption.UPGRADEONLY.getName() + 
                " [" + StartupOption.CLUSTERID.getName() + " cid]" +
                " [" + StartupOption.RENAMERESERVED.getName() + "<k-v pairs>] ] | \n\t["
              + StartupOption.ROLLBACK.getName() + "] | \n\t["
              + StartupOption.ROLLINGUPGRADE.getName() + " "
              + RollingUpgradeStartupOption.getAllOptionString() + " ] | \n\t["
              + StartupOption.IMPORT.getName() + "] | \n\t["
              + StartupOption.INITIALIZESHAREDEDITS.getName() + "] | \n\t["
              + StartupOption.BOOTSTRAPSTANDBY.getName() + "] | \n\t["
              + StartupOption.RECOVER.getName() + " [ "
              + StartupOption.FORCE.getName() + "] ] | \n\t["
              + StartupOption.METADATAVERSION.getName() + " ]";
        

        2) can we describe the options for zkfc also in the doc.It's not related to this jira, but options are same..?

        Usage: hdfs zkfc [-formatZK [-force] [-nonInteractive]]

        If everyone agrees, you can change jira summary also.

        Show
        brahmareddy Brahma Reddy Battula added a comment - Yiqun Lin thanks for working on this... 1) I am thinking ,we should update at following like namenode format which will make more sense..?. org.apache.hadoop.hdfs.server.namenode.NameNode#USAGE. private static final String USAGE = "Usage: hdfs namenode [" + StartupOption.BACKUP.getName() + "] | \n\t[" + StartupOption.CHECKPOINT.getName() + "] | \n\t[" + StartupOption.FORMAT.getName() + " [" + StartupOption.CLUSTERID.getName() + " cid ] [" + StartupOption.FORCE.getName() + "] [" + StartupOption.NONINTERACTIVE.getName() + "] ] | \n\t[" + StartupOption.UPGRADE.getName() + " [" + StartupOption.CLUSTERID.getName() + " cid]" + " [" + StartupOption.RENAMERESERVED.getName() + "<k-v pairs>] ] | \n\t[" + StartupOption.UPGRADEONLY.getName() + " [" + StartupOption.CLUSTERID.getName() + " cid]" + " [" + StartupOption.RENAMERESERVED.getName() + "<k-v pairs>] ] | \n\t[" + StartupOption.ROLLBACK.getName() + "] | \n\t[" + StartupOption.ROLLINGUPGRADE.getName() + " " + RollingUpgradeStartupOption.getAllOptionString() + " ] | \n\t[" + StartupOption.IMPORT.getName() + "] | \n\t[" + StartupOption.INITIALIZESHAREDEDITS.getName() + "] | \n\t[" + StartupOption.BOOTSTRAPSTANDBY.getName() + "] | \n\t[" + StartupOption.RECOVER.getName() + " [ " + StartupOption.FORCE.getName() + "] ] | \n\t[" + StartupOption.METADATAVERSION.getName() + " ]" ; 2) can we describe the options for zkfc also in the doc.It's not related to this jira, but options are same..? Usage: hdfs zkfc [-formatZK [-force] [-nonInteractive]] If everyone agrees, you can change jira summary also.
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Brahma Reddy Battula for the review and comments. That's a good catch.

        can we describe the options for zkfc also in the doc.It's not related to this jira, but options are same..?

        I am sure this place has been updated in the HDFS-11204, .
        New patch attached to address the first comment.

        Show
        linyiqun Yiqun Lin added a comment - Thanks Brahma Reddy Battula for the review and comments. That's a good catch. can we describe the options for zkfc also in the doc.It's not related to this jira, but options are same..? I am sure this place has been updated in the HDFS-11204 , . New patch attached to address the first comment.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
        +1 mvninstall 12m 27s trunk passed
        +1 compile 0m 45s trunk passed
        +1 checkstyle 0m 29s trunk passed
        +1 mvnsite 0m 50s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 42s trunk passed
        +1 javadoc 0m 40s trunk passed
        +1 mvninstall 0m 45s the patch passed
        +1 compile 0m 42s the patch passed
        +1 javac 0m 42s the patch passed
        +1 checkstyle 0m 26s the patch passed
        +1 mvnsite 0m 46s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 1s The patch has no whitespace issues.
        +1 findbugs 1m 46s the patch passed
        +1 javadoc 0m 37s the patch passed
        -1 unit 62m 25s hadoop-hdfs in the patch failed.
        +1 asflicense 0m 18s The patch does not generate ASF License warnings.
        86m 31s



        Reason Tests
        Failed junit tests hadoop.metrics2.sink.TestRollingFileSystemSinkWithHdfs



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:a9ad5d6
        JIRA Issue HDFS-11270
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844617/HDFS-11270.003.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 313b2868daa4 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / c721f78
        Default Java 1.8.0_111
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/17950/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17950/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17950/console
        Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 mvninstall 12m 27s trunk passed +1 compile 0m 45s trunk passed +1 checkstyle 0m 29s trunk passed +1 mvnsite 0m 50s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 42s trunk passed +1 javadoc 0m 40s trunk passed +1 mvninstall 0m 45s the patch passed +1 compile 0m 42s the patch passed +1 javac 0m 42s the patch passed +1 checkstyle 0m 26s the patch passed +1 mvnsite 0m 46s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 1s The patch has no whitespace issues. +1 findbugs 1m 46s the patch passed +1 javadoc 0m 37s the patch passed -1 unit 62m 25s hadoop-hdfs in the patch failed. +1 asflicense 0m 18s The patch does not generate ASF License warnings. 86m 31s Reason Tests Failed junit tests hadoop.metrics2.sink.TestRollingFileSystemSinkWithHdfs Subsystem Report/Notes Docker Image:yetus/hadoop:a9ad5d6 JIRA Issue HDFS-11270 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12844617/HDFS-11270.003.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 313b2868daa4 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / c721f78 Default Java 1.8.0_111 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/17950/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/17950/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/17950/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        liuml07 Mingliang Liu added a comment -

        Committed to trunk through branch-2.8 branches. Thanks for your contribution Yiqun Lin. Thanks for your helpful review, Brahma Reddy Battula.

        Show
        liuml07 Mingliang Liu added a comment - Committed to trunk through branch-2.8 branches. Thanks for your contribution Yiqun Lin . Thanks for your helpful review, Brahma Reddy Battula .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11041 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11041/)
        HDFS-11270. Document the missing options of NameNode bootstrap command. (liuml07: rev c0e0ef29696109af9a018462059f08fd99ee3121)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11041 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11041/ ) HDFS-11270 . Document the missing options of NameNode bootstrap command. (liuml07: rev c0e0ef29696109af9a018462059f08fd99ee3121) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HdfsServerConstants.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        Hide
        linyiqun Yiqun Lin added a comment -

        Thanks Mingliang Liu for the commit, and thanks Brahma Reddy Battula for the review!

        Show
        linyiqun Yiqun Lin added a comment - Thanks Mingliang Liu for the commit, and thanks Brahma Reddy Battula for the review!

          People

          • Assignee:
            linyiqun Yiqun Lin
            Reporter:
            linyiqun Yiqun Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development