GitHub user jerryshao opened a pull request:
https://github.com/apache/spark/pull/11518
[SPARK-13675][UI] Fix wrong url link for application running in yarn
cluster mode
## What changes were proposed in this pull request?
Current URL for each application to access history UI is like:
http://localhost:18080/history/application_1457058760338_0016/1/jobs/ or
http://localhost:18080/history/application_1457058760338_0016/2/jobs/
Here **1** or **2** represents the number of attempts in `historypage.js`,
but it will parse to attempt id in `HistoryServer`, while the correct attempt
id should be like "appattempt_1457058760338_0016_000002", so it will fail to
parse to a correct attempt id in HistoryServer.
This is OK in yarn client mode, since we don't need this attempt id to
fetch out the app cache, but it is failed in yarn cluster mode, where attempt
id "1" or "2" is actually wrong.
So here we should fix this url to parse the correct application id and
attempt id. Also the suffix "jobs/" is not needed.
Here is the screenshot:

## How was this patch tested?
This patch is tested manually, with different master and deploy mode.

You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jerryshao/apache-spark SPARK-13675
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11518.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 #11518
----
commit 41add6ac6fe62934e339bbff11769649e923e856
Author: jerryshao <[email protected]>
Date: 2016-03-04T10:17:07Z
Fix url link issue
----
---
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]