Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5380

Invalid mapred command should return non-zero exit code

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4-alpha, 3.0.0-alpha1
    • 0.23.10, 2.3.0
    • None
    • None
    • Reviewed

    Description

      Running the mapred bin script with an invalid command returns exit code 0, but it should return a non-zero exit code.

      [schu@hdfs-snapshots-1 ~]$ hadoop-3.0.0-SNAPSHOT/bin/mapred gibberish
      gibberish - invalid command
      Usage: mapred [--config confdir] COMMAND
             where COMMAND is one of:
        pipes                run a Pipes job
        job                  manipulate MapReduce jobs
        queue                get information regarding JobQueues
        classpath            prints the class path needed for running
                             mapreduce subcommands
        historyserver        run job history servers as a standalone daemon
        distcp <srcurl> <desturl> copy file or directories recursively
        archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
      
      Most commands print help when invoked w/o parameters.
      [schu@hdfs-snapshots-1 ~]$ echo $?
      0
      [schu@hdfs-snapshots-1 ~]$ 
      

      Attachments

        1. MAPREDUCE-5380.patch
          0.4 kB
          Stephen Chu
        2. MAPREDUCE-5380.patch
          0.7 kB
          Stephen Chu

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            schu Stephen Chu
            schu Stephen Chu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment