[SPARK-16439] Fix number formatting in SQL UI
## What changes were proposed in this pull request? Spark SQL UI display numbers greater than 1000 with u00A0 as grouping separator. Problem exists when server locale has no-breaking space as separator. (for example pl_PL) This patch turns off grouping and remove this separator. The problem starts with this PR. https://github.com/apache/spark/pull/12425/files#diff-803f475b01acfae1c5c96807c2ea9ddcR125 ## How was this patch tested? Manual UI tests. Screenshot attached. ![image](https://cloud.githubusercontent.com/assets/4006010/16749556/5cb5a372-47cb-11e6-9a95-67fd3f9d1c71.png) Author: Maciej Brynski <maciej.brynski@adpilot.pl> Closes #14142 from maver1ck/master.
This commit is contained in:
parent
f73891e0b9
commit
83879ebc58
|
@ -101,7 +101,9 @@ private[sql] object SQLMetrics {
|
||||||
*/
|
*/
|
||||||
def stringValue(metricsType: String, values: Seq[Long]): String = {
|
def stringValue(metricsType: String, values: Seq[Long]): String = {
|
||||||
if (metricsType == SUM_METRIC) {
|
if (metricsType == SUM_METRIC) {
|
||||||
NumberFormat.getInstance().format(values.sum)
|
val numberFormat = NumberFormat.getInstance()
|
||||||
|
numberFormat.setGroupingUsed(false)
|
||||||
|
numberFormat.format(values.sum)
|
||||||
} else {
|
} else {
|
||||||
val strFormat: Long => String = if (metricsType == SIZE_METRIC) {
|
val strFormat: Long => String = if (metricsType == SIZE_METRIC) {
|
||||||
Utils.bytesToString
|
Utils.bytesToString
|
||||||
|
|
Loading…
Reference in a new issue