You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/08 16:06:40 UTC

[GitHub] [spark] tgravescs opened a new pull request #29683: [SPARK-32823] Fix the master ui resources reporting

tgravescs opened a new pull request #29683:
URL: https://github.com/apache/spark/pull/29683


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   Fixes the master UI for properly summing the resources total across multiple workers. 
   field:
   Resources in use: 0 / 8 gpu
   
   The bug here is that it was creating MutableResourceInfo and then reducing using the + operator.  the + operator in MutableResourceInfo simple adds the address from one to the addresses of the other.  But its using a HashSet so if the addresses are the same then you lose the correct amount.  ie worker1 has gpu addresses 0,1,2,3 and worker2 has addresses 0,1,2,3 then you only see 4 total GPUs when there are 8.
   
   In this case we don't really need to create the MutableResourceInfo at all because we just want the sums for used and total so just remove the use of it.  The other uses of it are per Worker so those should be ok.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   fix UI
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   UI
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   
   tested manually on standalone cluster with multiple workers and multiple GPUs and multiple fpgas


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689181552






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689092492






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689180859


   **[Test build #128424 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128424/testReport)** for PR 29683 at commit [`0db1b3b`](https://github.com/apache/spark/commit/0db1b3b2111e89ff0a0b25be6f7251d0c0c4ad44).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-688984636


   **[Test build #128417 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128417/testReport)** for PR 29683 at commit [`0947a33`](https://github.com/apache/spark/commit/0947a33296274afe7fd2f11f639bda93a157a4bf).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29683:
URL: https://github.com/apache/spark/pull/29683


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689115616


   **[Test build #128424 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128424/testReport)** for PR 29683 at commit [`0db1b3b`](https://github.com/apache/spark/commit/0db1b3b2111e89ff0a0b25be6f7251d0c0c4ad44).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] Ngone51 commented on a change in pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on a change in pull request #29683:
URL: https://github.com/apache/spark/pull/29683#discussion_r485042128



##########
File path: core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala
##########
@@ -80,15 +80,15 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") {
       .flatMap(_.toIterator)
       .groupBy(_._1) // group by resource name
       .map { case (rName, rInfoArr) =>
-        rName -> rInfoArr.map(_._2).reduce(_ + _)
-      }.map { case (k, v) => (k, v.toResourceInformation) }
+      rName -> rInfoArr.map(_._2.addresses.size).sum
+    }
     val usedInfo = aliveWorkers.map(_.resourcesInfoUsed)
       .map (resources => toMutable(resources))

Review comment:
       We can avoid this conversion now? (and same for line 79)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689092492






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689181552






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689242878


   Merged to master and branch-3.0.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689116241






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-688980418






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689115616


   **[Test build #128424 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128424/testReport)** for PR 29683 at commit [`0db1b3b`](https://github.com/apache/spark/commit/0db1b3b2111e89ff0a0b25be6f7251d0c0c4ad44).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] tgravescs commented on pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
tgravescs commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-688980147


   @Ngone51 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-688980418






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-688984636


   **[Test build #128417 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128417/testReport)** for PR 29683 at commit [`0947a33`](https://github.com/apache/spark/commit/0947a33296274afe7fd2f11f639bda93a157a4bf).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689091410


   **[Test build #128417 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/128417/testReport)** for PR 29683 at commit [`0947a33`](https://github.com/apache/spark/commit/0947a33296274afe7fd2f11f639bda93a157a4bf).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #29683: [SPARK-32823][Web UI] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29683:
URL: https://github.com/apache/spark/pull/29683#issuecomment-689116241






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] tgravescs commented on a change in pull request #29683: [SPARK-32823] Fix the master ui resources reporting

Posted by GitBox <gi...@apache.org>.
tgravescs commented on a change in pull request #29683:
URL: https://github.com/apache/spark/pull/29683#discussion_r485108438



##########
File path: core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala
##########
@@ -80,15 +80,15 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") {
       .flatMap(_.toIterator)
       .groupBy(_._1) // group by resource name
       .map { case (rName, rInfoArr) =>
-        rName -> rInfoArr.map(_._2).reduce(_ + _)
-      }.map { case (k, v) => (k, v.toResourceInformation) }
+      rName -> rInfoArr.map(_._2.addresses.size).sum
+    }
     val usedInfo = aliveWorkers.map(_.resourcesInfoUsed)
       .map (resources => toMutable(resources))

Review comment:
       good catch, yes we should be able to, let me update.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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