You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by andrewor14 <gi...@git.apache.org> on 2014/08/02 09:46:37 UTC

[GitHub] spark pull request: [Minor] Fixes on top of #1679

GitHub user andrewor14 opened a pull request:

    https://github.com/apache/spark/pull/1736

    [Minor] Fixes on top of #1679

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewor14/spark amend-#1679

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/1736.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1736
    
----
commit 3b46f5e3afa85182dfc0d4170d41885498dbcab6
Author: Andrew Or <an...@gmail.com>
Date:   2014-08-02T07:45:08Z

    Minor fixes

----


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/1736#issuecomment-50956861
  
    QA tests have started for PR 1736. This patch merges cleanly. <br>View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17762/consoleFull


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by mridulm <gi...@git.apache.org>.
Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1736#discussion_r15732438
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala ---
    @@ -46,9 +46,8 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar
       metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new Gauge[Long] {
         override def getValue: Long = {
           val storageStatusList = blockManager.master.getStorageStatus
    -      val maxMem = storageStatusList.map(_.maxMem).sum
    -      val remainingMem = storageStatusList.map(_.memRemaining).sum
    -      (maxMem - remainingMem) / 1024 / 1024
    +      val memUsed = storageStatusList.map(_.memUsed).sum
    +      memUsed / 1024 / 1024
    --- End diff --
    
    bad code is bad code :-)


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by mridulm <gi...@git.apache.org>.
Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1736#discussion_r15728056
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala ---
    @@ -46,9 +46,8 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar
       metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new Gauge[Long] {
         override def getValue: Long = {
           val storageStatusList = blockManager.master.getStorageStatus
    -      val maxMem = storageStatusList.map(_.maxMem).sum
    -      val remainingMem = storageStatusList.map(_.memRemaining).sum
    -      (maxMem - remainingMem) / 1024 / 1024
    +      val memUsed = storageStatusList.map(_.memUsed).sum
    +      memUsed / 1024 / 1024
    --- End diff --
    
    nit: / (1024 * 1024) instead ?


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/1736#issuecomment-50957930
  
    QA results for PR 1736:<br>- This patch PASSES unit tests.<br>- This patch merges cleanly<br>- This patch adds no public classes<br><br>For more information see test ouptut:<br>https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17762/consoleFull


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/1736


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by mridulm <gi...@git.apache.org>.
Github user mridulm commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1736#discussion_r15732470
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala ---
    @@ -46,9 +46,8 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar
       metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new Gauge[Long] {
         override def getValue: Long = {
           val storageStatusList = blockManager.master.getStorageStatus
    -      val maxMem = storageStatusList.map(_.maxMem).sum
    -      val remainingMem = storageStatusList.map(_.memRemaining).sum
    -      (maxMem - remainingMem) / 1024 / 1024
    +      val memUsed = storageStatusList.map(_.memUsed).sum
    +      memUsed / 1024 / 1024
    --- End diff --
    
    Btw, it is just a nit - so please dont let this block a commit !


---
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


[GitHub] spark pull request: [Minor] Fixes on top of #1679

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1736#discussion_r15730250
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala ---
    @@ -46,9 +46,8 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar
       metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new Gauge[Long] {
         override def getValue: Long = {
           val storageStatusList = blockManager.master.getStorageStatus
    -      val maxMem = storageStatusList.map(_.maxMem).sum
    -      val remainingMem = storageStatusList.map(_.memRemaining).sum
    -      (maxMem - remainingMem) / 1024 / 1024
    +      val memUsed = storageStatusList.map(_.memUsed).sum
    +      memUsed / 1024 / 1024
    --- End diff --
    
    We do the double slash in other places as well. Changing those too would touch upon things I didn't touch in #1679, so I'd rather keep the changes in this PR at the minimum while keeping the code consistent with the other places in this file


---
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