Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-252

HADOOP_OPTS example in hadoop-env.sh breaks jsvc

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: CDH3u0
    • Fix Version/s: CDH4b2
    • Component/s: HDFS, Packaging
    • Labels:
      None

      Description

      Hi there,

      The hadoop-env.sh script shipped with conf.empty and conf.pseudo suggests that HADOOP_OPTS might reasonably be set to "-server". If users do this, however, they'll run into

      08/06/2011 10:08:35 18951 jsvc error: Invalid option -server
      08/06/2011 10:08:35 18951 jsvc error: Cannot parse command line arguments

      when they start the datanode.

      The reason is that jsvc doesn't support the "-server" option. I've filed https://issues.apache.org/jira/browse/DAEMON-208 upstream for that support.

      In the meanwhile, however, I recommend we remove the "suggestion" of using -server, and mention that the only valid flags are ones that exist in both jsvc 1.0.2 and standard java 1.6. I'll also note that the flags that jsvc support change over time. See http://www.apache.org/dist/commons/daemon/RELEASE-NOTES.txt for the latest release notes. Stuff like agentlib is now supported (though is not supported in the version of jsvc used by CDH3u0).

      Here are the relevant places where this happens if you're tracing it:

      etc/hadoop-0.20/conf.empty/hadoop-env.sh:
      18:# if [ "$HADOOP_OPTS" == "" ]; then export HADOOP_OPTS=-server; else HADOOP_OPTS+=" -server"; fi
      20:# Command specific options appended to HADOOP_OPTS when specified

      etc/hadoop-0.20/conf.pseudo/hadoop-env.sh:
      18:# if [ "$HADOOP_OPTS" == "" ]; then export HADOOP_OPTS=-server; else HADOOP_OPTS+=" -server"; fi
      20:# Command specific options appended to HADOOP_OPTS when specified

      usr/lib/hadoop-0.20/bin/hadoop:
      424: $JAVA_HEAP_MAX $HADOOP_OPTS \
      439: nohup $JAVA_EXEC -Dproc$COMMAND $JAVA_HEAP_MAX $HADOOP_OPTS -classpath "$CLASSPATH" $CLASS "$@" > "$_HADOOP_DAEMON_OUT" 2>&1 < /dev/null &

        Attachments

          Activity

            People

            • Assignee:
              rvs Roman V Shaposhnik
              Reporter:
              philip Philip Zeyliger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: