From d7150a1bc2fdf87bedb112ffbd1c5cab7f14d1c3 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Wed, 12 Nov 2014 15:58:51 -0800 Subject: [PATCH] HADOOP-11284. Fix variable name mismatches in hadoop-functions.sh (Masatake Iwasaki via aw) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/bin/hadoop-functions.sh | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 59773ae3e24..f8fca1645aa 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -340,6 +340,9 @@ Trunk (Unreleased) HADOOP-11248. Add hadoop configuration to disable Azure Filesystem metrics collection. (Shanyu Zhao via cnauroth) + HADOOP-11284. Fix variable name mismatches in hadoop-functions.sh (Masatake + Iwasaki via aw) + OPTIMIZATIONS HADOOP-7761. Improve the performance of raw comparisons. (todd) diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh index efa42f65229..52d5af9ceb3 100644 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh @@ -837,13 +837,13 @@ function hadoop_start_daemon_wrapper # shellcheck disable=SC2086 renice "${HADOOP_NICENESS}" $! >/dev/null 2>&1 if [[ $? -gt 0 ]]; then - hadoop_error "ERROR: Cannot set priority of ${daemoname} process $!" + hadoop_error "ERROR: Cannot set priority of ${daemonname} process $!" fi # shellcheck disable=SC2086 disown %+ >/dev/null 2>&1 if [[ $? -gt 0 ]]; then - hadoop_error "ERROR: Cannot disconnect ${daemoname} process $!" + hadoop_error "ERROR: Cannot disconnect ${daemonname} process $!" fi sleep 1 @@ -898,7 +898,7 @@ function hadoop_start_secure_daemon #shellcheck disable=SC2086 echo $$ > "${privpidfile}" 2>/dev/null if [[ $? -gt 0 ]]; then - hadoop_error "ERROR: Cannot write ${daemoname} pid ${privpidfile}." + hadoop_error "ERROR: Cannot write ${daemonname} pid ${privpidfile}." fi exec "${jsvc}" \ @@ -954,7 +954,7 @@ function hadoop_start_secure_daemon_wrapper # so let's wait for the fork to finish # before overriding with the daemonized pid (( counter=0 )) - while [[ ! -f ${pidfile} && ${counter} -le 5 ]]; do + while [[ ! -f ${daemonpidfile} && ${counter} -le 5 ]]; do sleep 1 (( counter++ )) done @@ -963,7 +963,7 @@ function hadoop_start_secure_daemon_wrapper #shellcheck disable=SC2086 echo $! > "${jsvcpidfile}" 2>/dev/null if [[ $? -gt 0 ]]; then - hadoop_error "ERROR: Cannot write ${daemonname} pid ${pidfile}." + hadoop_error "ERROR: Cannot write ${daemonname} pid ${daemonpidfile}." fi sleep 1 @@ -1037,8 +1037,8 @@ function hadoop_daemon_handler local daemonmode=$1 local daemonname=$2 local class=$3 - local pidfile=$4 - local outfile=$5 + local daemon_pidfile=$4 + local daemon_outfile=$5 shift 5 case ${daemonmode} in