VicoWu opened a new pull request, #6922:
URL: https://github.com/apache/hadoop/pull/6922

   the -Dhadoop.root.logger will use the value of `HADOOP_ROOT_LOGGER`.
   In most cases, hadoop administrator tends to setup HADOOP_ROOT_LOGGER 
directly, it is effective in non-daemon mode and most hadoop administrator are 
not even aware of the existense of `HADOOP_DAEMON_ROOT_LOGGER`.
   So when he started up HADOOP as daemon mode, no matter how he set up 
`HADOOP_ROOT_LOGGER`, the `-Dhadoop.root.logger` is not changed because in 
Daemon mode, the `HADOOP_ROOT_LOGGER` is set up by `HADOOP_DAEMON_ROOT_LOGGER` 
which is in fact a default value. The code is as below:
   ```shell
     if [[ "${HADOOP_DAEMON_MODE}" != "default" ]]; then
       if [[ "${HADOOP_DAEMON_ROOT_LOGGER}" != 
"${HADOOP_DAEMON_ROOT_LOGGER_DEFAULT}" ]]; then
         HADOOP_ROOT_LOGGER="${HADOOP_DAEMON_ROOT_LOGGER}"
       fi
       if [[ "${HADOOP_SUBCMD_SECURESERVICE}" = true ]]; then
         
HADOOP_LOGFILE="hadoop-${HADOOP_SECURE_USER}-${HADOOP_IDENT_STRING}-${HADOOP_SUBCMD}-${HOSTNAME}.log"
       else
         
HADOOP_LOGFILE="hadoop-${HADOOP_IDENT_STRING}-${HADOOP_SUBCMD}-${HOSTNAME}.log"
       fi
     fi
   ```
   
   But in DAEMON mode, the HADOOP_ROOT_LOGGER is ignored and the 
HADOOP_DAEMON_ROOT_LOGGER is set to HADOOP_ROOT_LOGGER.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to