You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/09/23 13:14:03 UTC
[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #3546: [KYUUBI #3544]fix bin/kyuubi stop check
pan3793 commented on code in PR #3546:
URL: https://github.com/apache/incubator-kyuubi/pull/3546#discussion_r978643192
##########
bin/kyuubi:
##########
@@ -154,17 +154,19 @@ function stop_kyuubi() {
TARGET_ID="$(cat "$pid")"
if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
echo "Stopping $CLASS"
- kill "$TARGET_ID" && rm -f "$pid"
+ kill "$TARGET_ID"
for i in {1..20}
do
sleep 0.5
if [[ ! $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
+ rm -f "$pid"
break
fi
done
- if [[ $(ps -p "$TARGET_ID" -o comm=) =~ "java" ]]; then
- echo "Failed to stop kyuubi after 10 seconds, try 'kill -9 ${TARGET_ID}' forcefully "
+ if [ -f ${pid} ]; then
+ echo "Failed to stop kyuubi after 10 seconds, try 'kill -9 ${TARGET_ID}' forcefully,
+ and remove pid file: ${pid}"
Review Comment:
how about run `kill -9 "$TARGET_ID"` here, then wait and check again?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org