Repository: spark
Updated Branches:
  refs/heads/branch-1.3 0c494cf9a -> ff8976ec7


[Spark-5889] Remove pid file after stopping service.

Currently the pid file is not deleted, and potentially may cause some problem 
after service is stopped. The fix remove the pid file after service stopped.

Author: Zhan Zhang <zhaz...@gmail.com>

Closes #4676 from zhzhan/spark-5889 and squashes the following commits:

eb01be1 [Zhan Zhang] solve review comments
b4c009e [Zhan Zhang] solve review comments
018110a [Zhan Zhang] spark-5889: remove pid file after stopping service
088d2a2 [Zhan Zhang] squash all commits
c1f1fa5 [Zhan Zhang] test

(cherry picked from commit ad6b169dee84df175b51933b7a3ad7f0bbc52cf3)
Signed-off-by: Sean Owen <so...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ff8976ec
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ff8976ec
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ff8976ec

Branch: refs/heads/branch-1.3
Commit: ff8976ec7825bec0f0c30bf763a8ad3dcc14542b
Parents: 0c494cf
Author: Zhan Zhang <zhaz...@gmail.com>
Authored: Thu Feb 19 23:13:02 2015 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Thu Feb 19 23:14:08 2015 +0000

----------------------------------------------------------------------
 sbin/spark-daemon.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/ff8976ec/sbin/spark-daemon.sh
----------------------------------------------------------------------
diff --git a/sbin/spark-daemon.sh b/sbin/spark-daemon.sh
index e1bcc7d..5e812a1 100755
--- a/sbin/spark-daemon.sh
+++ b/sbin/spark-daemon.sh
@@ -168,7 +168,7 @@ case $option in
       TARGET_ID="$(cat "$pid")"
       if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
         echo "stopping $command"
-        kill "$TARGET_ID"
+        kill "$TARGET_ID" && rm -f "$pid"
       else
         echo "no $command to stop"
       fi


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to