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

Fix hdfs CLI usage message for namenode and zkfc

    Details

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

      Description

      The usage message from code does not match with the one documented.
      1. "java NameNode" should be "hdfs namenode"
      2. Many of options are not documented.

      Usage message from code:

        private static final String USAGE = "Usage: java 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() + " ] "
            + " ]";
      

      Usage from document:
      hdfs namenode [-backup] |
      [-checkpoint] |
      [-format [-clusterid cid ] [-force] [-nonInteractive] ] |
      [-upgrade [-clusterid cid] [-renameReserved<k-v pairs>] ] |
      [-upgradeOnly [-clusterid cid] [-renameReserved<k-v pairs>] ] |
      [-rollback] |
      [-rollingUpgrade <downgrade |rollback> ] |
      [-finalize] |
      [-importCheckpoint] |
      [-initializeSharedEdits] |
      [-bootstrapStandby] |
      [-recover [-force] ] |
      [-metadataVersion ]

      1. HDFS-8552-002.patch
        2 kB
        Brahma Reddy Battula
      2. HDFS-8552.patch
        0.9 kB
        Brahma Reddy Battula

        Issue Links

          Activity

          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Xiaoyu Yao Attaching the patch,Kindly review..

          2. Many of options are not documented.

          AFAIK, All are documented..if I am wrong,please correct me..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Xiaoyu Yao Attaching the patch,Kindly review.. 2. Many of options are not documented. AFAIK, All are documented..if I am wrong,please correct me..
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          I think following one ( zkfc ) also, we need to fix..since code is from common,I did not fix with this issue..

          But I feel , fix can be given as part of this issue only since it's not major change..what do you feel..? do want me to raise another jira..?

           
          protected static final String USAGE = 
                "Usage: java zkfc [ -formatZK [-force] [-nonInteractive] ]";
          
          Show
          brahmareddy Brahma Reddy Battula added a comment - I think following one ( zkfc ) also, we need to fix..since code is from common,I did not fix with this issue.. But I feel , fix can be given as part of this issue only since it's not major change..what do you feel..? do want me to raise another jira..? protected static final String USAGE = "Usage: java zkfc [ -formatZK [-force] [-nonInteractive] ]" ;
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 17m 56s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 tests included 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 javac 7m 33s There were no new javac warning messages.
          +1 javadoc 9m 39s There were no new javadoc warning messages.
          +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 2m 14s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 36s mvn install still works.
          +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse.
          +1 findbugs 3m 14s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 native 3m 14s Pre-build of native portion
          -1 hdfs tests 160m 42s Tests failed in hadoop-hdfs.
              207m 6s  



          Reason Tests
          Failed unit tests hadoop.hdfs.server.namenode.TestFileTruncate
            hadoop.hdfs.server.namenode.TestClusterId



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12738222/HDFS-8552.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / b61b489
          hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11260/artifact/patchprocess/testrun_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11260/testReport/
          Java 1.7.0_55
          uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11260/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 17m 56s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 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 javac 7m 33s There were no new javac warning messages. +1 javadoc 9m 39s There were no new javadoc warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 2m 14s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 36s mvn install still works. +1 eclipse:eclipse 0m 32s The patch built with eclipse:eclipse. +1 findbugs 3m 14s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 native 3m 14s Pre-build of native portion -1 hdfs tests 160m 42s Tests failed in hadoop-hdfs.     207m 6s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.TestFileTruncate   hadoop.hdfs.server.namenode.TestClusterId Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12738222/HDFS-8552.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / b61b489 hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11260/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11260/testReport/ Java 1.7.0_55 uname Linux asf903.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11260/console This message was automatically generated.
          Hide
          xyao Xiaoyu Yao added a comment -

          You are right, I misread the usage strings in the original description and issue 2 is not a problem. I will update it.

          Show
          xyao Xiaoyu Yao added a comment - You are right, I misread the usage strings in the original description and issue 2 is not a problem. I will update it.
          Hide
          xyao Xiaoyu Yao added a comment -

          I think we could consolidate the fix together, please update the title as appropriate.

          Show
          xyao Xiaoyu Yao added a comment - I think we could consolidate the fix together, please update the title as appropriate.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Xiaoyu Yao Attached patch to address ZKFC and Namenode CLI usage..Y'day only I had raised for YARN and MR to handle CLI usage message..

          Kindly review!!

          Show
          brahmareddy Brahma Reddy Battula added a comment - Xiaoyu Yao Attached patch to address ZKFC and Namenode CLI usage..Y'day only I had raised for YARN and MR to handle CLI usage message.. Kindly review!!
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 19m 9s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          -1 tests included 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 javac 7m 26s There were no new javac warning messages.
          +1 javadoc 9m 37s There were no new javadoc warning messages.
          +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 3m 18s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 32s mvn install still works.
          +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse.
          +1 findbugs 5m 4s The patch does not introduce any new Findbugs (version 3.0.0) warnings.
          +1 common tests 23m 44s Tests passed in hadoop-common.
          -1 hdfs tests 161m 7s Tests failed in hadoop-hdfs.
              231m 56s  



          Reason Tests
          Failed unit tests hadoop.hdfs.server.namenode.TestClusterId



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12738410/HDFS-8552-002.patch
          Optional Tests javadoc javac unit findbugs checkstyle
          git revision trunk / 0e80d51
          hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11277/artifact/patchprocess/testrun_hadoop-common.txt
          hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11277/artifact/patchprocess/testrun_hadoop-hdfs.txt
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11277/testReport/
          Java 1.7.0_55
          uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11277/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 pre-patch 19m 9s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. -1 tests included 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 javac 7m 26s There were no new javac warning messages. +1 javadoc 9m 37s There were no new javadoc warning messages. +1 release audit 0m 22s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 3m 18s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 32s mvn install still works. +1 eclipse:eclipse 0m 33s The patch built with eclipse:eclipse. +1 findbugs 5m 4s The patch does not introduce any new Findbugs (version 3.0.0) warnings. +1 common tests 23m 44s Tests passed in hadoop-common. -1 hdfs tests 161m 7s Tests failed in hadoop-hdfs.     231m 56s   Reason Tests Failed unit tests hadoop.hdfs.server.namenode.TestClusterId Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12738410/HDFS-8552-002.patch Optional Tests javadoc javac unit findbugs checkstyle git revision trunk / 0e80d51 hadoop-common test log https://builds.apache.org/job/PreCommit-HDFS-Build/11277/artifact/patchprocess/testrun_hadoop-common.txt hadoop-hdfs test log https://builds.apache.org/job/PreCommit-HDFS-Build/11277/artifact/patchprocess/testrun_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/11277/testReport/ Java 1.7.0_55 uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HDFS-Build/11277/console This message was automatically generated.
          Hide
          xyao Xiaoyu Yao added a comment -

          Thanks Brahma Reddy Battula for the contribution. I've committed the fix to trunk and branch-2.

          Show
          xyao Xiaoyu Yao added a comment - Thanks Brahma Reddy Battula for the contribution. I've committed the fix to trunk and branch-2.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #7995 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7995/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #7995 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7995/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #223 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/223/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #223 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/223/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #953 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/953/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #953 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/953/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2151/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2151 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2151/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #212 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/212/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #212 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/212/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #221 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/221/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #221 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/221/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2169 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2169/)
          HDFS-8552. Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2169 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2169/ ) HDFS-8552 . Fix hdfs CLI usage message for namenode and zkfc. Contributed by Brahma Reddy Battula (xyao: rev 927577c87ca19e8b5b75722f78e2def6d9386576) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java

            People

            • Assignee:
              brahmareddy Brahma Reddy Battula
              Reporter:
              xyao Xiaoyu Yao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development