hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mitch Wyle (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9450) HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH is PREpended instead of APpended
Date Thu, 04 Apr 2013 21:50:18 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-9450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622847#comment-13622847
] 

Mitch Wyle commented on HADOOP-9450:
------------------------------------

Thanks for the detailed and quick reply, Chris!

The issue is that in all cases the HADOOP_CLASSPATH is appended to existing CLASSPATH instead
of prepended to pick up Users' JARS first.  If some class in a JAR is already there, users
cannot put their own FIRST.

{noformat}
# add user-specified CLASSPATH last
if [ "$HADOOP_USER_CLASSPATH_FIRST" = "" ] && [ "$HADOOP_CLASSPATH" != "" ]; then
  CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
fi
{noformat}

...should be:

{noformat}
# add user-specified CLASSPATH last
if [ "$HADOOP_USER_CLASSPATH_FIRST" = "" ] && [ "$HADOOP_CLASSPATH" != "" ]; then
  CLASSPATH=${HADOOP_CLASSPATH}:${CLASSPATH}
fi
{noformat}
                
> HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH is PREpended instead of APpended
> --------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9450
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9450
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Mitch Wyle
>
> On line 133 of the hadoop shell wrapper, CLASSPATH is set as:
> CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
> Notice that the built-up CLASSPATH, along with all the libs and unwanted JARS are pre-pended
BEFORE the user's HADOOP_CLASSPATH.  Therefore there is no way to put your own JARs in front
of those that the hadoop wrapper script sets.
> We propose a patch that reverses this order.  Failing that, we would like to add a command
line option to override this behavior and enable a user's JARs to be found before the wrong
ones in the Hadoop library paths.
> We always welcome your opinions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message