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

    https://github.com/apache/spark/pull/20474#discussion_r165604504
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala 
---
    @@ -51,6 +52,46 @@ private[v1] class AbstractApplicationResource extends 
BaseAppResource {
       @Path("executors")
       def executorList(): Seq[ExecutorSummary] = 
withUI(_.store.executorList(true))
     
    +  @GET
    +  @Path("executors/{executorId}/threads")
    +  def threadDump(@PathParam("executorId") executorId: String): Response = 
withUI { ui =>
    +    uiRoot.executorThreadDumpsNotAvailableError().getOrElse {
    +      val safeExecutorId =
    +        Option(UIUtils.stripXSS(executorId)).map { executorId =>
    +          UIUtils.decodeURLParameter(executorId)
    +        }.getOrElse {
    +          throw new IllegalArgumentException(s"Missing executorId 
parameter")
    +        }
    +
    +      def isAllDigits(x: String) = x.forall(Character.isDigit)
    +
    +      if (executorId != SparkContext.DRIVER_IDENTIFIER && 
!isAllDigits(executorId)) {
    --- End diff --
    
    I don't think so. As I see the app-id is also not case insensitive at the 
URL api/v1/applications/{app-id}.


---

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

Reply via email to