Github user attilapiros commented on a diff in the pull request:
https://github.com/apache/spark/pull/20474#discussion_r166285595
--- Diff:
core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
---
@@ -51,6 +51,52 @@ 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 =>
--- End diff --
Review comments are applied then retested and test results are updated.
Moreover I have removed the condition with UIUtils.stripXSS as the existing
check (whether the executorId is 'driver' or number) seams to me enough.
Some if conditions on options are transformed to a val initialised with a
getOrElse as the option value is safe to be used elsewhere.
As I have seen the JAX RS is at 2.0.1, so I did not touch the mapping of
exceptions to JSON.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]