Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10154#discussion_r50698808
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsPage.scala 
---
    @@ -233,6 +229,69 @@ private[ui] class ExecutorsPage(
           </tbody>
         </table>
       }
    +
    +  private def taskData(maxTasks: Int,
    +                        activeTasks: Int,
    +                        failedTasks: Int,
    +                        completedTasks: Int,
    +                        totalTasks: Int,
    +                        totalDuration: Long,
    +                        totalGCTime: Long):
    +  Seq[Node] = {
    +    // Determine Color Opacity from 0.5-1
    +    // activeTasks range from 0 to maxTasks
    +    val activeTasksAlpha =
    +      if (maxTasks > 0) {
    +        (activeTasks.toDouble / maxTasks) * 0.5 + 0.5
    +      } else {
    +        1
    +      }
    +    // failedTasks range max at 10% failure, alpha max = 1
    +    val failedTasksAlpha =
    +      if (totalTasks > 0) {
    +        math.min (10 * failedTasks.toDouble / totalTasks, 1) * 0.5 + 0.5
    --- End diff --
    
    remove space after min


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to