You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "zhouyifan279 (via GitHub)" <gi...@apache.org> on 2024/05/29 10:26:57 UTC
Re: [PR] [KYUUBI #4515] Capturing process id for kyuubi server launched using run command [kyuubi]
zhouyifan279 commented on code in PR #6374:
URL: https://github.com/apache/kyuubi/pull/6374#discussion_r1618644775
##########
bin/kyuubi:
##########
@@ -106,7 +106,20 @@ cmd="${RUNNER} ${KYUUBI_JAVA_OPTS} -cp ${KYUUBI_CLASSPATH} $CLASS"
pid="${KYUUBI_PID_DIR}/kyuubi-$USER-$CLASS.pid"
+function get_pid(){
+ if [[ ! -w ${KYUUBI_PID_DIR} ]]; then
+ echo "${USER} does not have 'w' permission to ${KYUUBI_PID_DIR}"
+ exit 1
+ fi
+
+ run_pid="$(ps -ef | grep kyuubi | grep java | grep -v grep | awk '{print $2}')"
Review Comment:
1. `grep kyuubi` is not sufficient to ensure that this is a Kyuubi Server process. For example, Kyuubi Engine processes also have `kyuubi` in their info.
2. User may have multiple Kyuubi installations on a single machine. We need to ensure that this Kyuubi Server process is launched using current Kyuubi installation.
--
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