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 ]

        Attachments

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

          Issue Links

            Activity

              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: