Hadoop Common
  1. Hadoop Common
  2. HADOOP-3281

bin/hadoop script should check class name before running java

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • 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_v01.patch
        6 kB
        Edward J. Yoon
      2. 3281.patch
        0.4 kB
        Edward J. Yoon

        Issue Links

          Activity

          Allen Wittenauer made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Allen Wittenauer made changes -
          Link This issue is related to HADOOP-11092 [ HADOOP-11092 ]
          Allen Wittenauer made changes -
          Link This issue is related to HADOOP-9902 [ HADOOP-9902 ]
          Allen Wittenauer made changes -
          Link This issue is related to HADOOP-9902 [ HADOOP-9902 ]
          Mukund Madhugiri made changes -
          Fix Version/s 0.18.0 [ 12312972 ]
          Edward J. Yoon made changes -
          Attachment 3281_v01.patch [ 12381295 ]
          Edward J. Yoon made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Edward J. Yoon made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Fix Version/s 0.18.0 [ 12312972 ]
          Edward J. Yoon made changes -
          Attachment 3281.patch [ 12381244 ]
          Edward J. Yoon made changes -
          Field Original Value New Value
          Assignee Edward J. Yoon [ udanax ]
          Tsz Wo Nicholas Sze created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development