You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Akira AJISAKA (JIRA)" <ji...@apache.org> on 2013/11/11 06:48:18 UTC
[jira] [Reopened] (HADOOP-6746) hadoop-daemon.sh does not append to
log files
[ https://issues.apache.org/jira/browse/HADOOP-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Akira AJISAKA reopened HADOOP-6746:
-----------------------------------
Assignee: Akira AJISAKA
> hadoop-daemon.sh does not append to log files
> ---------------------------------------------
>
> Key: HADOOP-6746
> URL: https://issues.apache.org/jira/browse/HADOOP-6746
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Travis Crawford
> Assignee: Akira AJISAKA
> Attachments: HADOOP-6746.patch
>
>
> Looking in hadoop-daemon.sh we see the start command redirects logs to the log file by creating a new file. It does not append to the log.
> nohup nice -n $HADOOP_NICENESS "$HADOOP_HOME"/bin/hadoop --config $HADOOP_CONF_DIR $command "$@" > "$log" 2>&1 < /dev/null &
> I believe output should be appended to the log file so logrotate copytruncate works. Currently a large log file cannot be truncated without restarting the running service, which causes issues in production environments.
> The improved line would be exactly the same, except use >> to open the log file in append mode.
> nohup nice -n $HADOOP_NICENESS "$HADOOP_HOME"/bin/hadoop --config $HADOOP_CONF_DIR $command "$@" >> "$log" 2>&1 < /dev/null &
--
This message was sent by Atlassian JIRA
(v6.1#6144)