[
https://issues.apache.org/jira/browse/HADOOP-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Owen O'Malley updated HADOOP-2811:
----------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
I just committed this. Thanks, Runping!
> 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.