HDFS-15932. Improve the balancer error message when process exits abnormally. Contributed by Renukaprasad C.

This commit is contained in:
He Xiaoqiao 2021-03-31 12:22:53 +08:00
parent 03e42efa30
commit 054e1c5e83
No known key found for this signature in database
GPG Key ID: A80CC124E9A0FA63
1 changed files with 2 additions and 2 deletions

View File

@ -2206,7 +2206,7 @@ function hadoop_daemon_handler
hadoop_verify_logdir
hadoop_status_daemon "${daemon_pidfile}"
if [[ $? == 0 ]]; then
hadoop_error "${daemonname} is running as process $(cat "${daemon_pidfile}"). Stop it first."
hadoop_error "${daemonname} is running as process $(cat "${daemon_pidfile}"). Stop it first and ensure ${daemon_pidfile} file is empty before retry."
exit 1
else
# stale pid file, so just remove it and continue on
@ -2267,7 +2267,7 @@ function hadoop_secure_daemon_handler
hadoop_verify_logdir
hadoop_status_daemon "${daemon_pidfile}"
if [[ $? == 0 ]]; then
hadoop_error "${daemonname} is running as process $(cat "${daemon_pidfile}"). Stop it first."
hadoop_error "${daemonname} is running as process $(cat "${daemon_pidfile}"). Stop it first and ensure ${daemon_pidfile} file is empty before retry."
exit 1
else
# stale pid file, so just remove it and continue on