You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by da...@apache.org on 2016/09/19 18:48:58 UTC
spark git commit: [SPARK-16439] [SQL] bring back the separator in SQL
UI
Repository: spark
Updated Branches:
refs/heads/master 80d665592 -> e06320626
[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 <da...@databricks.com>
Closes #15106 from davies/metric_sep.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e0632062
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e0632062
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e0632062
Branch: refs/heads/master
Commit: e0632062635c37cbc77df7ebd2a1846655193e12
Parents: 80d6655
Author: Davies Liu <da...@databricks.com>
Authored: Mon Sep 19 11:49:03 2016 -0700
Committer: Davies Liu <da...@gmail.com>
Committed: Mon Sep 19 11:49:03 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/e0632062/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-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org