HADOOP-12451. Setting HADOOP_HOME explicitly should be allowed. Fixing bugs in
the first patch committed. (Karthik Kambatla via vinodkv)
(cherry picked from commit b742ea7fe6
)
This commit is contained in:
parent
a0570ebb15
commit
373b29491f
|
@ -251,14 +251,13 @@ 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"
|
||||
|
||||
if [ "$HADOOP_HOME" = "" ]; then
|
||||
HADOOP_HOME=$HADOOP_PREFIX
|
||||
fi
|
||||
if [ "$cygwin" = true ]; then
|
||||
HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
|
||||
HADOOP_HOME=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)
|
||||
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
|
||||
export HADOOP_HOME
|
||||
else
|
||||
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_PREFIX"
|
||||
fi
|
||||
export HADOOP_HOME
|
||||
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
|
||||
|
|
|
@ -312,12 +312,15 @@ YARN_OPTS="$YARN_OPTS -Dyarn.log.dir=$YARN_LOG_DIR"
|
|||
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
|
||||
HADOOP_HOME=$(cygpath -w "$HADOOP_HOME" 2>/dev/null)
|
||||
HADOOP_HOME=$(cygpath -w "$HADOOP_PREFIX" 2>/dev/null)
|
||||
YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
|
||||
export HADOOP_HOME
|
||||
else
|
||||
YARN_OPTS="$YARN_OPTS -Dhadoop.home.dir=$HADOOP_PREFIX"
|
||||
fi
|
||||
export HADOOP_HOME
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue