Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4134

hadoop namenode & datanode entry points should return negative exit code on bad arguments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.4
    • Fix Version/s: 1.1.1
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      When you go hadoop namenode start (or some other bad argument to the namenode), a usage message is generated -but the script returns 0.

      This stops it being a robust command to invoke from other scripts -and is inconsistent with the JT & TT entry points, that do return -1 on a usage message

      1. HDFS-4134.patch
        1 kB
        Steve Loughran

        Activity

        Hide
        Steve Loughran added a comment -

        Actually I now advocate a -2 error code for usage issues -independent of any other error message.

        why? Stops you having to grab the output and do a regexp search to verify that the error code is a usage message from the inner java code, not some failure of java or the shell script to get that far: {{if [[ $

        {usage}

        =~ Usage ]];}}

        Show
        Steve Loughran added a comment - Actually I now advocate a -2 error code for usage issues -independent of any other error message. why? Stops you having to grab the output and do a regexp search to verify that the error code is a usage message from the inner java code, not some failure of java or the shell script to get that far: {{if [[ $ {usage} =~ Usage ]];}}
        Hide
        Steve Loughran added a comment -

        patch for branch-1 that returns -2 on a usage; 254 to a bash script that invokes it

        Show
        Steve Loughran added a comment - patch for branch-1 that returns -2 on a usage; 254 to a bash script that invokes it
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12551850/HDFS-4134.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3439//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12551850/HDFS-4134.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3439//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        +1 for the patch.

        Show
        Suresh Srinivas added a comment - +1 for the patch.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to branch-1 and branch-1.1. Thank you Steve.

        Show
        Suresh Srinivas added a comment - I committed the patch to branch-1 and branch-1.1. Thank you Steve.
        Hide
        Matt Foley added a comment -

        Closed upon release of 1.1.1.

        Show
        Matt Foley added a comment - Closed upon release of 1.1.1.

          People

          • Assignee:
            Unassigned
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development