You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Shen Yinjie (JIRA)" <ji...@apache.org> on 2018/06/26 07:41:00 UTC
[jira] [Created] (AMBARI-24190) HADOOP_CLASSPATH should always put
HADOOP_CONFIG_DIR first
Shen Yinjie created AMBARI-24190:
------------------------------------
Summary: HADOOP_CLASSPATH should always put HADOOP_CONFIG_DIR first
Key: AMBARI-24190
URL: https://issues.apache.org/jira/browse/AMBARI-24190
Project: Ambari
Issue Type: Bug
Reporter: Shen Yinjie
Currently,in hadoop-env.xml template,
{code}MAPREDUCE_LIBS=/usr/lib/hadoop-mapreduce/*
export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}
if [ -d "/usr/lib/tez" ]; then
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/lib/tez/*:/usr/lib/tez/lib/*:/etc/tez/conf
fi
{code}
In a scenario when a hadoop client uses hadoop shell and sets HADOOP_USER_CLASSPATH_FIRST , since HADOOP_CLASSPATH contains MAPREDUCE_LIBS,which has a core-site.xml in hadoop-mapreduce-client-jobclient-xx-tests.jar. This could pollute job runtime environment.
So, we should put HADOOP_CONFIG_DIR always in front of HADOOP_CLASSPATH.
I found that in Hadoop 3.0,this has already been done in hadoop-functions.sh.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)