spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-5282][mllib]: RowMatrix easily gets int...
Date Fri, 16 Jan 2015 15:02:01 GMT
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4069#discussion_r23084566
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/distributed/RowMatrix.scala
---
    @@ -131,7 +131,7 @@ class RowMatrix(
           throw new IllegalArgumentException(s"Argument with more than 65535 cols: $cols")
         }
         if (cols > 10000) {
    -      val mem = cols * cols * 8
    +      val mem = (math.pow(cols, 2) * 8).formatted("%,.0f")
    --- End diff --
    
    I know it's minor, but I think it might be simpler to report megabytes in the warning
message, since the reported size is at least 800MB. Then this can be simply `val memMB = (cols.toLong
* cols) / 125000`; that multiplication can't overflow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message