From ba3c80a5ca8fefae9d0e67232f9973e1a0458f58 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. --- 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 657b4414dcf..38982e40a11 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -288,6 +288,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._()._()._()._(); }