-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-20517][UI] Fix broken history UI download link #17795
Conversation
Change-Id: If6d86bb229f352065eccae3d8efa3bdaf9ba755a
Test build #76253 has finished for PR 17795 at commit
|
Jenkins, retest this please. |
Test build #76259 has started for PR 17795 at commit |
Jenkins, retest this please. |
Test build #76262 has finished for PR 17795 at commit
|
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 |
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 |
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 |
@ajbozarth OK, I will verify it. |
@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! |
I assume only event log download will be effected with #17582 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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>
@jerryshao the patch didn't merge to 2.0, but your other change is there, so you should probably take a look. |
Thanks @vanzin , let me submit a patch for branch 2.0. |
@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
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 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!