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

    https://github.com/apache/spark/pull/7808#discussion_r35930779
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala ---
    @@ -49,9 +49,28 @@ private[ui] class ExecutorThreadDumpPage(parent: 
ExecutorsTab) extends WebUIPage
         val maybeThreadDump = sc.get.getExecutorThreadDump(executorId)
     
         val content = maybeThreadDump.map { threadDump =>
    -      val dumpRows = threadDump.map { thread =>
    +      val dumpRows = threadDump.sortWith{
    +        case (threadTrace1, threadTrace2) => {
    +          val v1 = if (threadTrace1.threadName.contains("Executor task 
launch")) 1 else 0
    +          val v2 = if (threadTrace2.threadName.contains("Executor task 
launch")) 1 else 0
    +          if (v1 == v2) {
    +            threadTrace1.threadId > threadTrace2.threadId
    +          } else {
    +            v1 > v2
    +          }
    +        }
    +      }.map { thread =>
    +        val threadName = thread.threadName
    +        val styleString = "background:" + {
    +          if (threadName.contains("Executor task launch")) {
    --- End diff --
    
    I mean that we should update the `class` attribute of the `div` rather than 
embedding CSS rules in its `style` attribute.
    
    We can define a new class for the executor and non-executor thread rows, 
something like `.executor_thread`, and toggle that class here.  Then, in the 
`main.css` file we can move the mapping from that class name to the actual 
`background: #colorcode` rule.


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