diff --git a/CHANGES.txt b/CHANGES.txt index 4ca817d7b5..8c06c23aed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -208,6 +208,9 @@ Trunk (unreleased changes) HADOOP-6906. FileContext copy() utility doesn't work with recursive copying of directories. (vinod k v via mahadev) + HADOOP-6453. Hadoop wrapper script shouldn't ignore an existing + JAVA_LIBRARY_PATH. (Chad Metcalf via jghoman) + Release 0.21.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/bin/hadoop-config.sh b/bin/hadoop-config.sh index e821ed7575..ee7b55c8f5 100644 --- a/bin/hadoop-config.sh +++ b/bin/hadoop-config.sh @@ -182,14 +182,20 @@ unset IFS if $cygwin; then HADOOP_COMMON_HOME=`cygpath -w "$HADOOP_COMMON_HOME"` HADOOP_LOG_DIR=`cygpath -w "$HADOOP_LOG_DIR"` + JAVA_LIBRARY_PATH=`cygpath -w "$JAVA_LIBRARY_PATH"` fi + # setup 'java.library.path' for native-hadoop code if necessary -JAVA_LIBRARY_PATH='' + if [ -d "${HADOOP_COMMON_HOME}/build/native" -o -d "${HADOOP_COMMON_HOME}/lib/native" ]; then JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"` if [ -d "$HADOOP_COMMON_HOME/build/native" ]; then - JAVA_LIBRARY_PATH=${HADOOP_COMMON_HOME}/build/native/${JAVA_PLATFORM}/lib + if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then + JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:${HADOOP_CORE_HOME}/build/native/${JAVA_PLATFORM}/lib + else + JAVA_LIBRARY_PATH=${HADOOP_CORE_HOME}/build/native/${JAVA_PLATFORM}/lib + fi fi if [ -d "${HADOOP_COMMON_HOME}/lib/native" ]; then