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

    https://github.com/apache/spark/pull/17582#discussion_r112307541
  
    --- Diff: 
core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala ---
    @@ -184,14 +184,27 @@ private[v1] class ApiRootResource extends 
ApiRequestContext {
       @Path("applications/{appId}/logs")
       def getEventLogs(
           @PathParam("appId") appId: String): EventLogDownloadResource = {
    -    new EventLogDownloadResource(uiRoot, appId, None)
    +    try {
    +      // withSparkUI will throw NotFoundException if attemptId is existed 
for this application.
    +      // So we need to try again with attempt id "1".
    +      withSparkUI(appId, None) { _ =>
    --- End diff --
    
    Hmm... optimally you wouldn't do this, because loading the UI can be 
expensive. That would require recording extra information when listing 
applications and some massaging of internal APIs, so this is probably OK for 
now, but would be nice to track it separately as an enhancement.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to