Repository: spark
Updated Branches:
  refs/heads/branch-2.0 d6191a067 -> fef3ec151


[SPARK-16439] [SQL] bring back the separator in SQL UI

## What changes were proposed in this pull request?

Currently, the SQL metrics looks like `number of rows: 111111111111`, it's very 
hard to read how large the number is. So a separator was added by #12425, but 
removed by #14142, because the separator is weird in some locales (for example, 
pl_PL), this PR will add that back, but always use "," as the separator, since 
the SQL UI are all in English.

## How was this patch tested?

Existing tests.
![metrics](https://cloud.githubusercontent.com/assets/40902/14573908/21ad2f00-030d-11e6-9e2c-c544f30039ea.png)

Author: Davies Liu <dav...@databricks.com>

Closes #15106 from davies/metric_sep.

(cherry picked from commit e0632062635c37cbc77df7ebd2a1846655193e12)
Signed-off-by: Davies Liu <davies....@gmail.com>


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

Branch: refs/heads/branch-2.0
Commit: fef3ec151a67348ce05fbbec95b74a0a4fe1aa4b
Parents: d6191a0
Author: Davies Liu <dav...@databricks.com>
Authored: Mon Sep 19 11:49:03 2016 -0700
Committer: Davies Liu <davies....@gmail.com>
Committed: Mon Sep 19 11:49:34 2016 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/fef3ec15/sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
index 15afa0b..0cc1edd 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/metric/SQLMetrics.scala
@@ -18,6 +18,7 @@
 package org.apache.spark.sql.execution.metric
 
 import java.text.NumberFormat
+import java.util.Locale
 
 import org.apache.spark.SparkContext
 import org.apache.spark.scheduler.AccumulableInfo
@@ -101,8 +102,7 @@ object SQLMetrics {
    */
   def stringValue(metricsType: String, values: Seq[Long]): String = {
     if (metricsType == SUM_METRIC) {
-      val numberFormat = NumberFormat.getInstance()
-      numberFormat.setGroupingUsed(false)
+      val numberFormat = NumberFormat.getIntegerInstance(Locale.ENGLISH)
       numberFormat.format(values.sum)
     } else {
       val strFormat: Long => String = if (metricsType == SIZE_METRIC) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to