[ https://issues.apache.org/jira/browse/MAPREDUCE-4659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457275#comment-13457275 ]
Sandy Ryza commented on MAPREDUCE-4659: --------------------------------------- What would be the best way to find the path to the hadoop common jar? The script currently adds all the jars in certain folders. # tarball layout if [ -d "$HADOOP_HOME/webapps" ]; then CLASSPATH=${CLASSPATH}:$HADOOP_HOME fi for f in $HADOOP_HOME/hadoop-core-*.jar; do CLASSPATH=${CLASSPATH}:$f; done # add libs to CLASSPATH for f in $HADOOP_HOME/lib/*.jar; do CLASSPATH=${CLASSPATH}:$f; done if [ -d "$HADOOP_HOME/build/ivy/lib/Hadoop/common" ]; then for f in $HADOOP_HOME/build/ivy/lib/Hadoop/common/*.jar; do CLASSPATH=${CLASSPATH}:$f; done fi for f in $HADOOP_HOME/lib/jsp-2.1/*.jar; do CLASSPATH=${CLASSPATH}:$f; done for f in $HADOOP_HOME/hadoop-tools-*.jar; do TOOL_PATH=${TOOL_PATH}:$f; done for f in $HADOOP_HOME/build/hadoop-tools-*.jar; do TOOL_PATH=${TOOL_PATH}:$f; done > Confusing output when running "hadoop version" from one hadoop installation > when HADOOP_HOME points to another > -------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-4659 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-4659 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: client > Affects Versions: 0.20.2 > Reporter: Sandy Ryza > > Hadoop version X is downloaded to ~/hadoop-x, and Hadoop version Y is > downloaded to ~/hadoop-y. HADOOP_HOME is set to hadoop-x. A user running > hadoop-y/bin/hadoop might expect to be running the hadoop-y jars, but, > because of HADOOP_HOME, will actually be running hadoop-x jars. > "hadoop version" could help clear this up a little by reporting the current > HADOOP_HOME. -- 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