GitHub user carsonwang opened a pull request:

    https://github.com/apache/spark/pull/10352

    [SPARK-12399] Display correct error message when accessing REST API with an 
unknown app Id

    I got an exception when accessing the below REST API with an unknown 
application Id.
    `/api/v1/applications/xxx/jobs`
    Instead of an exception, I expect an error message "no such app: xxx" which 
is a similar error message when I access `/api/v1/applications/xxx`
    ```
    org.spark-project.guava.util.concurrent.UncheckedExecutionException: 
java.util.NoSuchElementException: no app with key xxx
        at 
org.spark-project.guava.cache.LocalCache$Segment.get(LocalCache.java:2263)
        at org.spark-project.guava.cache.LocalCache.get(LocalCache.java:4000)
        at 
org.spark-project.guava.cache.LocalCache.getOrLoad(LocalCache.java:4004)
        at 
org.spark-project.guava.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
        at 
org.apache.spark.deploy.history.HistoryServer.getSparkUI(HistoryServer.scala:116)
        at 
org.apache.spark.status.api.v1.UIRoot$class.withSparkUI(ApiRootResource.scala:226)
        at 
org.apache.spark.deploy.history.HistoryServer.withSparkUI(HistoryServer.scala:46)
        at 
org.apache.spark.status.api.v1.ApiRootResource.getJobs(ApiRootResource.scala:66)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/carsonwang/spark unknownAppFix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/10352.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10352
    
----
commit a7721afdaead1977c78c8afb60ebd21e076a1e01
Author: Carson Wang <[email protected]>
Date:   2015-12-17T07:37:23Z

    Display correct error message when accessing REST API with an unknown app Id

----


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