MAPREDUCE-5621. mr-jobhistory-daemon.sh doesn't have to execute mkdir and chown all the time. Contributed by Shinichi Yamashita.
This commit is contained in:
parent
f2d440b3b3
commit
ea3dba37cd
|
@ -78,8 +78,10 @@ if [ -f "${HADOOP_CONF_DIR}/mapred-env.sh" ]; then
|
|||
. "${HADOOP_CONF_DIR}/mapred-env.sh"
|
||||
fi
|
||||
|
||||
mkdir -p "$HADOOP_MAPRED_LOG_DIR"
|
||||
chown $HADOOP_MAPRED_IDENT_STRING $HADOOP_MAPRED_LOG_DIR
|
||||
if [ ! -w "$HADOOP_MAPRED_LOG_DIR" ]; then
|
||||
mkdir -p "$HADOOP_MAPRED_LOG_DIR"
|
||||
chown "$HADOOP_MAPRED_IDENT_STRING" "$HADOOP_MAPRED_LOG_DIR"
|
||||
fi
|
||||
|
||||
if [ "$HADOOP_MAPRED_PID_DIR" = "" ]; then
|
||||
HADOOP_MAPRED_PID_DIR=/tmp
|
||||
|
|
Loading…
Reference in New Issue