Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-3281

bin/hadoop script should check class name before running java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • scripts
    • None

    Description

      When the first parameter ($1) cannot be matched with one of existing hadoop commnads, the parameter will be considered as a class name and the script will pass it to java. For examples,

      bash-3.2$ ./bin/hadoop -version
      java version "1.5.0_14"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
      bash-3.2$ ./bin/hadoop -help   
      Usage: java [-options] class [args...]
                 (to execute a class)
         or  java [-options] -jar jarfile [args...]
                 (to execute a jar file)
      ...
      

      The behavior above is confusing. We should check whether the parameter is a valid class name before passing it to java.

      Attachments

        1. 3281_v01.patch
          6 kB
          Edward J. Yoon
        2. 3281.patch
          0.4 kB
          Edward J. Yoon

        Issue Links

          Activity

            People

              udanax Edward J. Yoon
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: