HADOOP-18779. Improve hadoop-function.sh#status script. (#5762)

This commit is contained in:
slfan1989 2023-07-03 23:46:57 +08:00 committed by GitHub
parent 9659d0720d
commit e8590adb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2192,6 +2192,13 @@ function hadoop_daemon_handler
case ${daemonmode} in
status)
hadoop_status_daemon "${daemon_pidfile}"
if [[ $? == 0 ]]; then
echo "${daemonname} is running as process $(cat "${daemon_pidfile}")."
elif [[ $? == 1 ]]; then
echo "${daemonname} is stopped."
else
hadoop_error "hadoop_status_daemon error."
fi
exit $?
;;