Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
VicoWu committed Jul 6, 2024
1 parent 13dcc40 commit 6a82029
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,8 @@ function hadoop_basic_init
HADOOP_NICENESS=${HADOOP_NICENESS:-0}
HADOOP_STOP_TIMEOUT=${HADOOP_STOP_TIMEOUT:-5}
HADOOP_PID_DIR=${HADOOP_PID_DIR:-/tmp}
HADOOP_ROOT_LOGGER_DEFAULT="${HADOOP_LOGLEVEL},console}"
HADOOP_DAEMON_ROOT_LOGGER_DEFAULT="${HADOOP_LOGLEVEL},RFA}"
HADOOP_ROOT_LOGGER_DEFAULT="${HADOOP_LOGLEVEL},console"
HADOOP_DAEMON_ROOT_LOGGER_DEFAULT="${HADOOP_LOGLEVEL},RFA"
HADOOP_ROOT_LOGGER=${HADOOP_ROOT_LOGGER:-${HADOOP_ROOT_LOGGER_DEFAULT}}
HADOOP_DAEMON_ROOT_LOGGER=${HADOOP_DAEMON_ROOT_LOGGER:-${HADOOP_DAEMON_ROOT_LOGGER_DEFAULT}}
HADOOP_SECURITY_LOGGER=${HADOOP_SECURITY_LOGGER:-INFO,NullAppender}
Expand Down Expand Up @@ -2714,8 +2714,11 @@ function hadoop_generic_java_subcmd_handler
# In daemon mode, when and only when use has already customized HADOOP_DAEMON_ROOT_LOGGER
# we will use HADOOP_DAEMON_ROOT_LOGGER as the final hadoop.root.logger
if [[ "${HADOOP_DAEMON_MODE}" != "default" ]]; then
if [[ "${HADOOP_DAEMON_ROOT_LOGGER}" != "${HADOOP_DAEMON_ROOT_LOGGER_DEFAULT}" ]]; then
if [[ "${HADOOP_ROOT_LOGGER}" = "${HADOOP_ROOT_LOGGER_DEFAULT}" ||
"${HADOOP_DAEMON_ROOT_LOGGER}" != "${HADOOP_DAEMON_ROOT_LOGGER_DEFAULT}" ]]; then
HADOOP_ROOT_LOGGER="${HADOOP_DAEMON_ROOT_LOGGER}"
else
hadoop_error "Using customized HADOOP_ROOT_LOGGER as final hadoop.root.logger. Recommending using HADOOP_LOGLEVEL or customize HADOOP_DAEMON_ROOT_LOGGER for logging in daemon mode."
fi
if [[ "${HADOOP_SUBCMD_SECURESERVICE}" = true ]]; then
HADOOP_LOGFILE="hadoop-${HADOOP_SECURE_USER}-${HADOOP_IDENT_STRING}-${HADOOP_SUBCMD}-${HOSTNAME}.log"
Expand Down

0 comments on commit 6a82029

Please sign in to comment.