diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d9c2ce42796..a16463d9271 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -419,6 +419,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12159. Move DistCpUtils#compareFs() to org.apache.hadoop.fs.FileUtil and fix for HA namespaces (rchiang via rkanter) + HADOOP-12116. Fix unrecommended syntax usages in hadoop/hdfs/yarn script for + cygwin in branch-2. (Li Lu via cnauroth) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop b/hadoop-common-project/hadoop-common/src/main/bin/hadoop index 6cb808508f2..1575996bbb9 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop @@ -128,7 +128,7 @@ case $COMMAND in CLASS=org.apache.hadoop.util.Classpath else # No need to bother starting up a JVM for this simple case. - if $cygwin; then + if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) fi echo $CLASSPATH @@ -143,7 +143,7 @@ case $COMMAND in fi # cygwin path translation - if $cygwin; then + if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh index 3c3c19f3cd3..4c440711896 100644 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh @@ -251,7 +251,7 @@ TOOL_PATH="${TOOL_PATH:-$HADOOP_PREFIX/share/hadoop/tools/lib/*}" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE" HADOOP_HOME=$HADOOP_PREFIX -if $cygwin; then +if [ "$cygwin" = true ]; then HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null) fi export HADOOP_HOME @@ -259,7 +259,7 @@ HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}" if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then - if $cygwin; then + if [ "$cygwin" = true ]; then JAVA_LIBRARY_PATH=$(cygpath -w "$JAVA_LIBRARY_PATH" 2>/dev/null) fi HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs index 7cae2891480..fbfbaf2568f 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs @@ -209,7 +209,7 @@ elif [ "$COMMAND" = "classpath" ]; then CLASS=org.apache.hadoop.util.Classpath else # No need to bother starting up a JVM for this simple case. - if $cygwin; then + if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) fi echo $CLASSPATH @@ -220,7 +220,7 @@ else fi # cygwin path translation -if $cygwin; then +if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred index fe16e077a72..277dc96ce8b 100755 --- a/hadoop-mapreduce-project/bin/mapred +++ b/hadoop-mapreduce-project/bin/mapred @@ -146,7 +146,7 @@ if [ "$COMMAND" = "classpath" ] ; then if [ "$#" -gt 0 ]; then CLASS=org.apache.hadoop.util.Classpath else - if $cygwin; then + if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) fi echo $CLASSPATH @@ -155,7 +155,7 @@ if [ "$COMMAND" = "classpath" ] ; then fi # cygwin path translation -if $cygwin; then +if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn index 1c05b2830e0..49e3b88193b 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn @@ -211,7 +211,7 @@ if [ "$COMMAND" = "classpath" ] ; then if [ "$#" -gt 0 ]; then CLASS=org.apache.hadoop.util.Classpath else - if $cygwin; then + if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) fi echo $CLASSPATH @@ -327,7 +327,7 @@ else fi # cygwin path translation -if $cygwin; then +if [ "$cygwin" = true ]; then CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) @@ -345,7 +345,7 @@ YARN_OPTS="$YARN_OPTS -Dhadoop.log.file=$YARN_LOGFILE" YARN_OPTS="$YARN_OPTS -Dyarn.log.file=$YARN_LOGFILE" YARN_OPTS="$YARN_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME" HADOOP_HOME=$HADOOP_PREFIX -if $cygwin; then +if [ "$cygwin" = true ]; then HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null) fi export HADOOP_HOME @@ -353,7 +353,7 @@ YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_HOME" YARN_OPTS="$YARN_OPTS -Dhadoop.root.logger=${YARN_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}" YARN_OPTS="$YARN_OPTS -Dyarn.root.logger=${YARN_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}" if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then - if $cygwin; then + if [ "$cygwin" = true ]; then JAVA_LIBRARY_PATH=$(cygpath -w "$JAVA_LIBRARY_PATH" 2>/dev/null) fi YARN_OPTS="$YARN_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"