Hadoop Common
  1. Hadoop Common
  2. HADOOP-3281

bin/hadoop script should check class name before running java

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: scripts
    • Labels:
      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.

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Edward J. Yoon
            Reporter:
            Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development