HADOOP-12116. Fix unrecommended syntax usages in hadoop/hdfs/yarn script for cygwin in branch-2. Contributed by Li Lu.

This commit is contained in:
cnauroth 2015-06-30 16:55:10 -07:00
parent e5b0439bc1
commit f7ba3c0045
6 changed files with 15 additions and 12 deletions

View File

@ -419,6 +419,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-12159. Move DistCpUtils#compareFs() to org.apache.hadoop.fs.FileUtil HADOOP-12159. Move DistCpUtils#compareFs() to org.apache.hadoop.fs.FileUtil
and fix for HA namespaces (rchiang via rkanter) 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 Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -128,7 +128,7 @@ case $COMMAND in
CLASS=org.apache.hadoop.util.Classpath CLASS=org.apache.hadoop.util.Classpath
else else
# No need to bother starting up a JVM for this simple case. # 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) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
fi fi
echo $CLASSPATH echo $CLASSPATH
@ -143,7 +143,7 @@ case $COMMAND in
fi fi
# cygwin path translation # cygwin path translation
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null)
HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)

View File

@ -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.dir=$HADOOP_LOG_DIR"
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"
HADOOP_HOME=$HADOOP_PREFIX HADOOP_HOME=$HADOOP_PREFIX
if $cygwin; then if [ "$cygwin" = true ]; then
HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null) HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
fi fi
export HADOOP_HOME 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.id.str=$HADOOP_IDENT_STRING"
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}" HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}"
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then 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) JAVA_LIBRARY_PATH=$(cygpath -w "$JAVA_LIBRARY_PATH" 2>/dev/null)
fi fi
HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"

View File

@ -209,7 +209,7 @@ elif [ "$COMMAND" = "classpath" ]; then
CLASS=org.apache.hadoop.util.Classpath CLASS=org.apache.hadoop.util.Classpath
else else
# No need to bother starting up a JVM for this simple case. # 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) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
fi fi
echo $CLASSPATH echo $CLASSPATH
@ -220,7 +220,7 @@ else
fi fi
# cygwin path translation # cygwin path translation
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null)
HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)

View File

@ -146,7 +146,7 @@ if [ "$COMMAND" = "classpath" ] ; then
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then
CLASS=org.apache.hadoop.util.Classpath CLASS=org.apache.hadoop.util.Classpath
else else
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
fi fi
echo $CLASSPATH echo $CLASSPATH
@ -155,7 +155,7 @@ if [ "$COMMAND" = "classpath" ] ; then
fi fi
# cygwin path translation # cygwin path translation
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null)
HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null) HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)

View File

@ -211,7 +211,7 @@ if [ "$COMMAND" = "classpath" ] ; then
if [ "$#" -gt 0 ]; then if [ "$#" -gt 0 ]; then
CLASS=org.apache.hadoop.util.Classpath CLASS=org.apache.hadoop.util.Classpath
else else
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
fi fi
echo $CLASSPATH echo $CLASSPATH
@ -327,7 +327,7 @@ else
fi fi
# cygwin path translation # cygwin path translation
if $cygwin; then if [ "$cygwin" = true ]; then
CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null) CLASSPATH=$(cygpath -p -w "$CLASSPATH" 2>/dev/null)
HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null) HADOOP_LOG_DIR=$(cygpath -w "$HADOOP_LOG_DIR" 2>/dev/null)
HADOOP_PREFIX=$(cygpath -w "$HADOOP_PREFIX" 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.log.file=$YARN_LOGFILE"
YARN_OPTS="$YARN_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME" YARN_OPTS="$YARN_OPTS -Dyarn.home.dir=$HADOOP_YARN_HOME"
HADOOP_HOME=$HADOOP_PREFIX HADOOP_HOME=$HADOOP_PREFIX
if $cygwin; then if [ "$cygwin" = true ]; then
HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null) HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
fi fi
export HADOOP_HOME 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 -Dhadoop.root.logger=${YARN_ROOT_LOGGER:-${HADOOP_LOGLEVEL},console}"
YARN_OPTS="$YARN_OPTS -Dyarn.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 [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
if $cygwin; then if [ "$cygwin" = true ]; then
JAVA_LIBRARY_PATH=$(cygpath -w "$JAVA_LIBRARY_PATH" 2>/dev/null) JAVA_LIBRARY_PATH=$(cygpath -w "$JAVA_LIBRARY_PATH" 2>/dev/null)
fi fi
YARN_OPTS="$YARN_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH" YARN_OPTS="$YARN_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"