You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crunch.apache.org by to...@apache.org on 2017/04/12 14:06:00 UTC

crunch git commit: CRUNCH-641: Wrong decimal format in dot files. Contributed by Gergő Pásztor.

Repository: crunch
Updated Branches:
  refs/heads/master d5e40e339 -> afc171fb7


CRUNCH-641: Wrong decimal format in dot files. Contributed by Gerg\u0151 P�sztor.


Project: http://git-wip-us.apache.org/repos/asf/crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/crunch/commit/afc171fb
Tree: http://git-wip-us.apache.org/repos/asf/crunch/tree/afc171fb
Diff: http://git-wip-us.apache.org/repos/asf/crunch/diff/afc171fb

Branch: refs/heads/master
Commit: afc171fb7ad06a8c0a12fb00811874a99bf8d310
Parents: d5e40e3
Author: Tom White <to...@apache.org>
Authored: Wed Apr 12 15:03:41 2017 +0100
Committer: Tom White <to...@apache.org>
Committed: Wed Apr 12 15:03:41 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/crunch/blob/afc171fb/crunch-core/src/main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java
----------------------------------------------------------------------
diff --git a/crunch-core/src/main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java b/crunch-core/src/main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java
index 24afb7c..94859cc 100644
--- a/crunch-core/src/main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java
+++ b/crunch-core/src/main/java/org/apache/crunch/impl/mr/plan/DotfileWriter.java
@@ -18,7 +18,9 @@
 package org.apache.crunch.impl.mr.plan;
 
 import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -68,7 +70,8 @@ public class DotfileWriter {
 
     String size = "";
     try {
-      DecimalFormat formatter = new DecimalFormat("#,###.##");
+      DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols(Locale.ENGLISH);
+      DecimalFormat formatter = new DecimalFormat("#,###.##", formatSymbols);
       size = " " + formatter.format(pcollectionImpl.getSize()/1024.0/1024.0) + " Mb";
     } catch (Exception e) {
       // Just skip those that don't have a size