diff options
author | Richard Benkovsky <richard.benkovsky@gooddata.com> | 2012-05-19 15:13:20 +0200 |
---|---|---|
committer | Richard Benkovsky <richard.benkovsky@gooddata.com> | 2012-05-19 15:13:20 +0200 |
commit | 822a4be37dd8b86228d1747ad3e2831ac258bafe (patch) | |
tree | 8f051e93605218c4f3daf5fa4c4779177f886073 /core | |
parent | 10716b1766625d7cb5a75b99b399a879eee27aef (diff) | |
download | spark-822a4be37dd8b86228d1747ad3e2831ac258bafe.tar.gz spark-822a4be37dd8b86228d1747ad3e2831ac258bafe.tar.bz2 spark-822a4be37dd8b86228d1747ad3e2831ac258bafe.zip |
Utils.memoryBytesToString fixed
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/Utils.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/scala/spark/Utils.scala b/core/src/main/scala/spark/Utils.scala index d108c14f6b..d8356c2d2f 100644 --- a/core/src/main/scala/spark/Utils.scala +++ b/core/src/main/scala/spark/Utils.scala @@ -2,11 +2,11 @@ package spark import java.io._ import java.net.InetAddress -import java.util.UUID import java.util.concurrent.{Executors, ThreadFactory, ThreadPoolExecutor} import scala.collection.mutable.ArrayBuffer import scala.util.Random +import java.util.{Locale, UUID} /** * Various utility methods used by Spark. @@ -184,7 +184,7 @@ object Utils { val GB = 1L << 30 val MB = 1L << 20 val KB = 1L << 10 - val B = 1L + val (value, unit) = { if (size >= 2*GB) { (size.asInstanceOf[Double] / GB, "GB") @@ -196,6 +196,6 @@ object Utils { (size.asInstanceOf[Double], "B") } } - "%.1f%s".format(value, unit) + "%.1f%s".formatLocal(Locale.US, value, unit) } } |