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

    https://github.com/apache/spark/pull/7910#discussion_r38534968
  
    --- Diff: 
core/src/main/scala/org/apache/spark/ui/exec/ExecutorThreadDumpPage.scala ---
    @@ -48,7 +49,13 @@ private[ui] class ExecutorThreadDumpPage(parent: 
ExecutorsTab) extends WebUIPage
         val time = System.currentTimeMillis()
         val maybeThreadDump = sc.get.getExecutorThreadDump(executorId)
     
    -    val content = maybeThreadDump.map { threadDump =>
    +    val grepExp = 
Option(request.getParameter("grepexp")).map(Pattern.compile(_, 
Pattern.MULTILINE))
    +
    +    val filteredContent = maybeThreadDump.map { threadDump =>
    +      threadDump.filter(thread =>
    +        grepExp.map { grep => 
grep.matcher(thread.stackTrace).find()}.getOrElse(true)
    +      )
    --- End diff --
    
    also minor: what do you think about renaming `threadDump` to `threadDumps` 
(plural)?  again not a big deal, and I know it was already `threadDump` in this 
file, not something you added ... but the singular always confuses me for just 
a second, I think that we're filtering individual elements of the stack trace, 
not complete threads.


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