浏览代码

HADOOP-11966. Variable cygwin is undefined in hadoop-config.sh when executed through hadoop-daemon.sh. Contributed by Chris Nauroth.

(cherry picked from commit ddc4afeff256e124ce4291c7a2bab37ad55c8e5c)
cnauroth 10 年之前
父节点
当前提交
82530ba0f1

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -32,6 +32,9 @@ Release 2.7.1 - UNRELEASED
     HADOOP-11663. Remove description about Java 6 from docs.
     (Masatake Iwasaki via aajisaka)
 
+    HADOOP-11966. Variable cygwin is undefined in hadoop-config.sh when executed
+    through hadoop-daemon.sh. (cnauroth)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES

+ 0 - 5
hadoop-common-project/hadoop-common/src/main/bin/hadoop

@@ -23,11 +23,6 @@ bin=`cd "$bin"; pwd`
  
 DEFAULT_LIBEXEC_DIR="$bin"/../libexec
 
-cygwin=false
-case "$(uname)" in
-CYGWIN*) cygwin=true;;
-esac
-
 HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
 . $HADOOP_LIBEXEC_DIR/hadoop-config.sh
 

+ 5 - 0
hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh

@@ -145,6 +145,11 @@ if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
   . "${HADOOP_CONF_DIR}/hadoop-env.sh"
 fi
 
+cygwin=false
+case "$(uname)" in
+CYGWIN*) cygwin=true;;
+esac
+
 # check if net.ipv6.bindv6only is set to 1
 bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
 if [ -n "$bindv6only" ] && [ "$bindv6only" -eq "1" ] && [ "$HADOOP_ALLOW_IPV6" != "yes" ]

+ 0 - 5
hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs

@@ -31,11 +31,6 @@ bin=`cd "$bin" > /dev/null; pwd`
 
 DEFAULT_LIBEXEC_DIR="$bin"/../libexec
 
-cygwin=false
-case "$(uname)" in
-CYGWIN*) cygwin=true;;
-esac
-
 HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
 . $HADOOP_LIBEXEC_DIR/hdfs-config.sh
 

+ 0 - 5
hadoop-mapreduce-project/bin/mapred

@@ -21,11 +21,6 @@ bin=`cd "$bin"; pwd`
 
 DEFAULT_LIBEXEC_DIR="$bin"/../libexec
 
-cygwin=false
-case "$(uname)" in
-CYGWIN*) cygwin=true;;
-esac
-
 HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
 if [ -e ${HADOOP_LIBEXEC_DIR}/mapred-config.sh ]; then
   . ${HADOOP_LIBEXEC_DIR}/mapred-config.sh

+ 0 - 5
hadoop-yarn-project/hadoop-yarn/bin/yarn

@@ -56,11 +56,6 @@ bin=`cd "$bin"; pwd`
 
 DEFAULT_LIBEXEC_DIR="$bin"/../libexec
 
-cygwin=false
-case "$(uname)" in
-CYGWIN*) cygwin=true;;
-esac
-
 HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
 . $HADOOP_LIBEXEC_DIR/yarn-config.sh