Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 26715 invoked from network); 23 May 2008 17:36:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 May 2008 17:36:17 -0000 Received: (qmail 44785 invoked by uid 500); 23 May 2008 17:36:18 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 44758 invoked by uid 500); 23 May 2008 17:36:18 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 44743 invoked by uid 99); 23 May 2008 17:36:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2008 10:36:17 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2008 17:35:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2C36234C11E for ; Fri, 23 May 2008 10:35:55 -0700 (PDT) Message-ID: <1638417805.1211564155731.JavaMail.jira@brutus> Date: Fri, 23 May 2008 10:35:55 -0700 (PDT) From: "Doug Cutting (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-3439) TaskTracker.addDiagnostics(String file, int num, String tag) could exit early if num==0 In-Reply-To: <1958799659.1211550475773.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599442#action_12599442 ] Doug Cutting commented on HADOOP-3439: -------------------------------------- > loads in a conf option (that is not in hadoop-default, incidentally) The rule for whether things belong in hadoop-default.xml or not is whether or not they are intended to be overridden in hadoop-site.xml. Many parameters are only intended to be set by code, adding these to hadoop-default.xml just clutters what's primarily meant to be documentation. Parameters meant to be set only by code should have static accessor methods on a relevant class, e.g., Foo#setFoo(Configuration c, String value). Also, it's reasonable to leave out of hadoop-default.xml debugging parameters that are intended only for use by developers, not by end users. That's been the (unwritten?) policy. Does it make sense? If so, perhaps we should record it somewhere... > TaskTracker.addDiagnostics(String file, int num, String tag) could exit early if num==0 > --------------------------------------------------------------------------------------- > > Key: HADOOP-3439 > URL: https://issues.apache.org/jira/browse/HADOOP-3439 > Project: Hadoop Core > Issue Type: Improvement > Components: mapred > Affects Versions: 0.18.0 > Reporter: Steve Loughran > Priority: Minor > > When a TaskTracker job finishes, taskFinished() is invoked. > as part of its work it > 1. loads in a conf option (that is not in hadoop-default, incidentally) , mapred.debug.out.lines , default value -1; > 2. calls addDiagnostics passing in that line count > addDiagnostics either builds a string buffer of all the output, or creates a linear array of lines and runs adds them, shuffling them up if there are more lines than expected. > This is all unneeded if the number of lines to print == 0; the entire reading in of the output file can be skipped. This may speed up termination slightly on a run with a large output file and mapred.debug.out.lines ==0. > Note also that a circular buffer would handle the lines>0 problem without having to copy all the strings around. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.