From 7386323735aa682781153a96fb8ed3b8ce7d8a7c Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Fri, 13 Feb 2015 16:09:54 +0900 Subject: [PATCH] MAPREDUCE-6255. Fix JobCounter's format to use grouping separator. Contributed by Ryu Kobayashi. (cherry picked from commit ba3c80a5ca8fefae9d0e67232f9973e1a0458f58) --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/mapreduce/v2/app/webapp/CountersBlock.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 66029f88b92..09d52aba8f0 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -52,6 +52,9 @@ Release 2.7.0 - UNRELEASED MAPREDUCE-4431. mapred command should print the reason on killing already completed jobs. (devaraj via ozawa) + MAPREDUCE-6255. Fix JobCounter's format to use grouping separator. + (Ryu Kobayashi via ozawa) + OPTIMIZATIONS MAPREDUCE-6169. MergeQueue should release reference to the current item diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java index 1b20c5dc4ed..568658e1587 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/CountersBlock.java @@ -139,10 +139,10 @@ public class CountersBlock extends HtmlBlock { Counter mc = mg == null ? null : mg.findCounter(counter.getName()); Counter rc = rg == null ? null : rg.findCounter(counter.getName()); groupRow. - td(mc == null ? "0" : String.valueOf(mc.getValue())). - td(rc == null ? "0" : String.valueOf(rc.getValue())); + td(mc == null ? "0" : String.format("%,d", mc.getValue())). + td(rc == null ? "0" : String.format("%,d", rc.getValue())); } - groupRow.td(String.valueOf(counter.getValue()))._(); + groupRow.td(String.format("%,d", counter.getValue()))._(); } group._()._()._()._(); }