Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 47325 invoked from network); 14 Feb 2008 20:09:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Feb 2008 20:09:31 -0000 Received: (qmail 30087 invoked by uid 500); 14 Feb 2008 20:09:23 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 30047 invoked by uid 500); 14 Feb 2008 20:09:22 -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 30037 invoked by uid 99); 14 Feb 2008 20:09:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 12:09:22 -0800 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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 20:08:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DF94271406C for ; Thu, 14 Feb 2008 12:09:07 -0800 (PST) Message-ID: <1606507.1203019747906.JavaMail.jira@brutus> Date: Thu, 14 Feb 2008 12:09:07 -0800 (PST) From: "Runping Qi (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-2811) method Counters.makeCompactString() does not insert separator char ',' between the counters of different groups. In-Reply-To: <24287275.1202868792058.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-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569073#action_12569073 ] Runping Qi commented on HADOOP-2811: ------------------------------------ The patch has one line change, and miniCluster unit test covers the code path. No need to have an additional test. > method Counters.makeCompactString() does not insert separator char ',' between the counters of different groups. > ---------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-2811 > URL: https://issues.apache.org/jira/browse/HADOOP-2811 > Project: Hadoop Core > Issue Type: Bug > Components: mapred > Affects Versions: 0.16.0 > Reporter: Runping Qi > Assignee: Runping Qi > Priority: Critical > Fix For: 0.16.1 > > Attachments: patch-2811.txt > > > The corrent code is: > {code} > public synchronized String makeCompactString() { > StringBuffer buffer = new StringBuffer(); > for(Group group: this){ > boolean first = true; > for(Counter counter: group) { > if (first) { > first = false; > } else { > buffer.append(','); > } > buffer.append(group.getDisplayName()); > buffer.append('.'); > buffer.append(counter.getDisplayName()); > buffer.append('='); > buffer.append(counter.getCounter()); > } > } > return buffer.toString(); > } > {code} > The correct code should be like: > {code} > public synchronized String makeCompactString() { > StringBuffer buffer = new StringBuffer(); > boolean first = true; > for(Group group: this){ > > for(Counter counter: group) { > if (first) { > first = false; > } else { > buffer.append(','); > } > buffer.append(group.getDisplayName()); > buffer.append('.'); > buffer.append(counter.getDisplayName()); > buffer.append('='); > buffer.append(counter.getCounter()); > } > } > return buffer.toString(); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.