From dc31d66f8a97fa824e9cbfde17d723dd5db44e07 Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Wed, 16 Jul 2014 10:48:15 +0000 Subject: [PATCH] HADOOP-9921. daemon scripts should remove pid file on stop call after stop or process is found not running ( Contributed by Vinayakumar B) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1610964 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/bin/hadoop-daemon.sh | 1 + hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh | 1 + hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh | 1 + 4 files changed, 6 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index d7a7bf93dc..eb33836841 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -422,6 +422,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10810. Clean up native code compilation warnings. (cnauroth) + HADOOP-9921. daemon scripts should remove pid file on stop call after stop + or process is found not running ( vinayakumarb ) + Release 2.5.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh index bb6ed8690e..6a4cd69152 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemon.sh @@ -198,6 +198,7 @@ case $startStop in else echo no $command to stop fi + rm -f $pid else echo no $command to stop fi diff --git a/hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh b/hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh index 9ef3d454d1..7585c9a81e 100644 --- a/hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh +++ b/hadoop-mapreduce-project/bin/mr-jobhistory-daemon.sh @@ -133,6 +133,7 @@ case $startStop in else echo no $command to stop fi + rm -f $pid else echo no $command to stop fi diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh b/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh index 527ae42cfd..fbfa71d80d 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn-daemon.sh @@ -145,6 +145,7 @@ case $startStop in else echo no $command to stop fi + rm -f $pid else echo no $command to stop fi