Skip to content

Commit ad6b169

Browse files
zhzhansrowen
authored andcommitted
[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 <[email protected]> Closes apache#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
1 parent a5fed34 commit ad6b169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbin/spark-daemon.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ case $option in
168168
TARGET_ID="$(cat "$pid")"
169169
if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
170170
echo "stopping $command"
171-
kill "$TARGET_ID"
171+
kill "$TARGET_ID" && rm -f "$pid"
172172
else
173173
echo "no $command to stop"
174174
fi

0 commit comments

Comments
 (0)