You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2018/11/09 14:23:00 UTC

[jira] [Commented] (SPARK-25696) The storage memory displayed on spark Application UI is incorrect.

    [ https://issues.apache.org/jira/browse/SPARK-25696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16681500#comment-16681500 ] 

Sean Owen commented on SPARK-25696:
-----------------------------------

Per the pull request -- the error is actually slightly different. Yes 1024 should be the factor, but, all the units need to be displayed as kibibytes, etc. KiB, GiB and so on. Just changing the 1000 is wrong.

> The storage memory displayed on spark Application UI is incorrect.
> ------------------------------------------------------------------
>
>                 Key: SPARK-25696
>                 URL: https://issues.apache.org/jira/browse/SPARK-25696
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 2.3.2
>            Reporter: hantiantian
>            Priority: Major
>
> In the reported heartbeat information, the unit of the memory data is bytes, which is converted by the formatBytes() function in the utils.js file before being displayed in the interface. The cardinality of the unit conversion in the formatBytes function is 1000, which should be 1024.
> function formatBytes(bytes, type)
> {    if (type !== 'display') return bytes;    if (bytes == 0) return '0.0 B';    var k = 1000;    var dm = 1;    var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];    var i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; }
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org