crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject crunch git commit: CRUNCH-641: Wrong decimal format in dot files. Contributed by Gergő Pásztor.
Date Wed, 12 Apr 2017 14:06:00 GMT
Repository: crunch
Updated Branches:
  refs/heads/master d5e40e339 -> afc171fb7


CRUNCH-641: Wrong decimal format in dot files. Contributed by Gergő 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 <tomwhite@apache.org>
Authored: Wed Apr 12 15:03:41 2017 +0100
Committer: Tom White <tomwhite@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


Mime
View raw message