Return-Path: Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: (qmail 89073 invoked from network); 3 May 2010 19:20:21 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 19:20:21 -0000 Received: (qmail 19820 invoked by uid 500); 3 May 2010 19:20:20 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 19755 invoked by uid 500); 3 May 2010 19:20:20 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 19747 invoked by uid 99); 3 May 2010 19:20:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 19:20:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 19:20:17 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o43JJuu7000560 for ; Mon, 3 May 2010 19:19:56 GMT Message-ID: <14621755.20041272914396420.JavaMail.jira@thor> Date: Mon, 3 May 2010 15:19:56 -0400 (EDT) From: "Travis Crawford (JIRA)" To: common-dev@hadoop.apache.org Subject: [jira] Created: (HADOOP-6746) hadoop-daemon.sh does not append to log files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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 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 is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.