Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20517][UI] Fix broken history UI download link - #17795
Conversation
Change-Id: If6d86bb229f352065eccae3d8efa3bdaf9ba755a
SparkQA
commented
Apr 28, 2017
Test build #76253 has finished for PR 17795 at commit
|
jerryshao
commented
Apr 28, 2017
Jenkins, retest this please. |
SparkQA
commented
Apr 28, 2017
Test build #76259 has started for PR 17795 at commit |
jerryshao
commented
Apr 28, 2017
Jenkins, retest this please. |
SparkQA
commented
Apr 28, 2017
Test build #76262 has finished for PR 17795 at commit
|
ajbozarth
commented
Apr 28, 2017
This is a clean way of doing this, but my reasoning behind how I did it was from my understanding even if there's only one attempt you could still access it with an attempt id, I actually went into the code to check that it worked that way. I'm just wondering if there's a need to add this if it works as is, but if the way I had it originally is just a loophole I'm fine changing it. |
@ajbozarth the key point is that several spark applications doesn't have attempt id. It's not related to one attempt or two, for example: This app doesn't have attempt id, so using |
jerryshao
commented
Apr 29, 2017
This is due to my changes in #17582 , with this change, download API will verify with correct ACL, so if attemptId is not found, then |
jerryshao
commented
Apr 29, 2017
ajbozarth
commented
Apr 29, 2017
Oh ok, I see why this is needed now that I see how #17582 changes how the api works, though I'm a bit worried this might not be the only thing that might've broken. You may want to look around for other cases like this where attempt ID is used for apps without one since prior to your change the api understood attempt id = 0 was the same as no attempt id. Having said that, this LGTM |
jerryshao
commented
Apr 29, 2017
@ajbozarth OK, I will verify it. |
jerryshao
commented
Apr 29, 2017
@ajbozarth , I checked the UI related to attemptId, seems fine without issue. Can you please point out in which code potentially has the regression? Thanks! |
jerryshao
commented
Apr 29, 2017
I assume only event log download will be effected with #17582 . |
vanzin
commented
May 1, 2017
Merging to master / 2.2 / 2.1 / 2.0. There's a missing space in the code but I'll fix that during merge. |
The download link in history server UI is concatenated with:
```
<td><a href="{{uiroot}}/api/v1/applications/{{id}}/{{num}}/logs" class="btn btn-info btn-mini">Download</a></td>
```
Here `num` field represents number of attempts, this is not equal to REST APIs. In the REST API, if attempt id is not existed the URL should be `api/v1/applications/<id>/logs`, otherwise the URL should be `api/v1/applications/<id>/<attemptId>/logs`. Using `<num>` to represent `<attemptId>` will lead to the issue of "no such app".
Manual verification.
CC ajbozarth can you please review this change, since you add this feature before? Thanks!
Author: jerryshao <sshao@hortonworks.com>
Closes#17795 from jerryshao/SPARK-20517.
(cherry picked from commit ab30590)
Signed-off-by: Marcelo Vanzin <vanzin@cloudera.com>The download link in history server UI is concatenated with:
```
<td><a href="{{uiroot}}/api/v1/applications/{{id}}/{{num}}/logs" class="btn btn-info btn-mini">Download</a></td>
```
Here `num` field represents number of attempts, this is not equal to REST APIs. In the REST API, if attempt id is not existed the URL should be `api/v1/applications/<id>/logs`, otherwise the URL should be `api/v1/applications/<id>/<attemptId>/logs`. Using `<num>` to represent `<attemptId>` will lead to the issue of "no such app".
Manual verification.
CC ajbozarth can you please review this change, since you add this feature before? Thanks!
Author: jerryshao <sshao@hortonworks.com>
Closes#17795 from jerryshao/SPARK-20517.
(cherry picked from commit ab30590)
Signed-off-by: Marcelo Vanzin <vanzin@cloudera.com>vanzin
commented
May 1, 2017
@jerryshao the patch didn't merge to 2.0, but your other change is there, so you should probably take a look. |
jerryshao
commented
May 2, 2017
Thanks @vanzin , let me submit a patch for branch 2.0. |
jerryshao
commented
May 2, 2017
@vanzin , since branch 2.0 doesn't have this feature in UI (https://issues.apache.org/jira/browse/SPARK-11272), so I don't think it is required to fix in branch-2.0. |
What changes were proposed in this pull request?
The download link in history server UI is concatenated with:
Here
numfield represents number of attempts, this is not equal to REST APIs. In the REST API, if attempt id is not existed the URL should beapi/v1/applications/<id>/logs, otherwise the URL should beapi/v1/applications/<id>/<attemptId>/logs. Using<num>to represent<attemptId>will lead to the issue of "no such app".How was this patch tested?
Manual verification.
CC @ajbozarth can you please review this change, since you add this feature before? Thanks!