Hadoop Common
  1. Hadoop Common
  2. HADOOP-7491

hadoop command should respect HADOOP_OPTS when given a class name

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When using the hadoop command HADOOP_OPTS and HADOOP_CLIENT_OPTS options are not passeed through.

        Issue Links

          Activity

          Hide
          Eli Collins added a comment -

          Before HADOOP-7325 users could specify options on the command line before the class name (instead of using HADOOP_OPTS), but can no longer do so because class name that start with "-" are no longer accepted.

          Show
          Eli Collins added a comment - Before HADOOP-7325 users could specify options on the command line before the class name (instead of using HADOOP_OPTS), but can no longer do so because class name that start with "-" are no longer accepted.
          Hide
          Eli Collins added a comment -

          Patch attached.

          Anyone know why we didn't do this from the start? I can't think of a reason why you wouldn't want to respect HADOOP_OPTS and HADOOP_CLIENT_OPTS when using bin/hadoop to run a class.

          Show
          Eli Collins added a comment - Patch attached. Anyone know why we didn't do this from the start? I can't think of a reason why you wouldn't want to respect HADOOP_OPTS and HADOOP_CLIENT_OPTS when using bin/hadoop to run a class.
          Hide
          Aaron T. Myers added a comment -

          +1, patch looks good to me.

          No idea why we didn't do this in the first place. Probably just an oversight.

          Show
          Aaron T. Myers added a comment - +1, patch looks good to me. No idea why we didn't do this in the first place. Probably just an oversight.
          Hide
          Eli Collins added a comment -

          Thanks atm. I concur. Btw verified by hand that HADOOP_OPTS is now respected since Hudson won't pick up on this.

          common $ export HADOOP_OPTS="-INVALID"
          common $ ./bin/hadoop org.apache.hadoop.hdfs.tools.HDFSConcat
          Unrecognized option: -INVALID
          Could not create the Java virtual machine.
          
          Show
          Eli Collins added a comment - Thanks atm. I concur. Btw verified by hand that HADOOP_OPTS is now respected since Hudson won't pick up on this. common $ export HADOOP_OPTS="-INVALID" common $ ./bin/hadoop org.apache.hadoop.hdfs.tools.HDFSConcat Unrecognized option: -INVALID Could not create the Java virtual machine.
          Hide
          Eli Collins added a comment -

          I've committed this. Thanks atm.

          Show
          Eli Collins added a comment - I've committed this. Thanks atm.

            People

            • Assignee:
              Eli Collins
              Reporter:
              Eli Collins
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development