-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-7161][History Server] Provide REST api to download event logs fro... #5792
Conversation
Merged build triggered. |
Merged build started. |
Merged build triggered. |
Merged build started. |
Test build #31342 has started for PR 5792 at commit |
Merged build finished. Test FAILed. |
Test FAILed. |
Test build #31342 has finished for PR 5792 at commit
|
Merged build finished. Test FAILed. |
Test FAILed. |
Merged build triggered. |
Merged build started. |
Test build #31460 has started for PR 5792 at commit |
Test build #31460 has finished for PR 5792 at commit
|
Merged build finished. Test PASSed. |
Test PASSed. |
Build triggered. |
Build started. |
Test build #31792 has started for PR 5792 at commit |
Test build #31792 has finished for PR 5792 at commit
|
Build finished. Test PASSed. |
Test PASSed. |
@@ -104,6 +108,52 @@ class HistoryServer( | |||
|
|||
initialize() | |||
|
|||
private[spark] class HistoryServlet(val appId: String) extends HttpServlet { |
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.
can you rename this to something more specific? eg., EventLogDownloadServlet
?
also I think it can probably be priviate[history]
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.
I think this servlet will go away when I merge this with the JSON end point change. I'm not sure whether I should add this to the JSON endpoint change or leave this servlet as is (since this is not really a JSON output, and from the current state it looks like the endpoints seem specific to returning JSON).
Hi @harishreedharan, I left a couple of comments, but some more high-level comments:
|
Thanks @squito for taking a look. Yes, this lives in a separate servlet right now, as this was pre-JSON api getting pushed. From what I understand (I don't really have much idea about Jersey, so I am most likely wrong), the current code does not provide a way to return a file (the I will add some tests - I wanted some feedback on the approach and the API before I did. |
Merged build started. |
Test build #34058 has started for PR 5792 at commit |
Test build #34057 has finished for PR 5792 at commit
|
Merged build finished. Test PASSed. |
Test build #34058 has finished for PR 5792 at commit
|
Merged build finished. Test PASSed. |
can you add this to the Rest API section in |
@squito Thanks for taking a look! I just updated the docs. |
Merged build triggered. |
Merged build started. |
Test build #34095 has started for PR 5792 at commit |
This might've broken the Hadoop 1 build |
We should really add some hadoop 1 PR sanity checker if we really plan to keep on supporting it. PRs only build against hadoop 2 currently. |
Yea that might be good to do. It's not super high cost right now though since it is caught by the master build matrix, and the frequency of it happening is low. |
@rxin Can you please post a link to the broken build? I don't think any hadoop-2 specific APIs were used - either way there should be an equivalent API in Hadoop 1, if I did use a Hadoop-2 specific API |
Test build #34095 has finished for PR 5792 at commit
|
Merged build finished. Test PASSed. |
Replaced `fs.listFiles` with Hadoop-1 friendly `fs.listStatus` method. Author: Hari Shreedharan <[email protected]> Closes #6619 from harishreedharan/evetlog-hadoop-1-fix and squashes the following commits: 6192078 [Hari Shreedharan] [HOTFIX] Fix Hadoop-1 build caused by #5972.
<td>Download the event logs for all attempts of the given application as a zip file</td> | ||
</tr> | ||
<tr> | ||
<td><code>/applications/[app-id]/[attempt-id/logs</code></td> |
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.
I realize this has already been merged, but there's a stray [
here
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.
Do you want me to open another PR with these changes?
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.
Actually that's a missing ]
.
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.
@harishreedharan Yeah, we should fix this one. Sorry I wasn't able to review this in time.
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.
@andrewor14 Here you are: #6628
thanks for taking another look and catching this stuff, sorry I missed it @andrewor14 |
… fro... ...m History Server This PR adds a new API that allows the user to download event logs for an application as a zip file. APIs have been added to download all logs for a given application or just for a specific attempt. This also add an additional method to the ApplicationHistoryProvider to get the raw files, zipped. Author: Hari Shreedharan <[email protected]> Closes apache#5792 from harishreedharan/eventlog-download and squashes the following commits: 221cc26 [Hari Shreedharan] Update docs with new API information. a131be6 [Hari Shreedharan] Fix style issues. 5528bd8 [Hari Shreedharan] Merge branch 'master' into eventlog-download 6e8156e [Hari Shreedharan] Simplify tests, use Guava stream copy methods. d8ddede [Hari Shreedharan] Remove unnecessary case in EventLogDownloadResource. ffffb53 [Hari Shreedharan] Changed interface to use zip stream. Added more tests. 1100b40 [Hari Shreedharan] Ensure that `Path` does not appear in interfaces, by rafactoring interfaces. 5a5f3e2 [Hari Shreedharan] Fix test ordering issue. 0b66948 [Hari Shreedharan] Minor formatting/import fixes. 4fc518c [Hari Shreedharan] Fix rat failures. a48b91f [Hari Shreedharan] Refactor to make attemptId optional in the API. Also added tests. 0fc1424 [Hari Shreedharan] File download now works for individual attempts and the entire application. 350d7e8 [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into eventlog-download fd6ab00 [Hari Shreedharan] Fix style issues 32b7662 [Hari Shreedharan] Use UIRoot directly in ApiRootResource. Also, use `Response` class to set headers. 7b362b2 [Hari Shreedharan] Almost working. 3d18ebc [Hari Shreedharan] [WIP] Try getting the event log download to work.
Replaced `fs.listFiles` with Hadoop-1 friendly `fs.listStatus` method. Author: Hari Shreedharan <[email protected]> Closes apache#6619 from harishreedharan/evetlog-hadoop-1-fix and squashes the following commits: 6192078 [Hari Shreedharan] [HOTFIX] Fix Hadoop-1 build caused by apache#5972.
… fro... ...m History Server This PR adds a new API that allows the user to download event logs for an application as a zip file. APIs have been added to download all logs for a given application or just for a specific attempt. This also add an additional method to the ApplicationHistoryProvider to get the raw files, zipped. Author: Hari Shreedharan <[email protected]> Closes apache#5792 from harishreedharan/eventlog-download and squashes the following commits: 221cc26 [Hari Shreedharan] Update docs with new API information. a131be6 [Hari Shreedharan] Fix style issues. 5528bd8 [Hari Shreedharan] Merge branch 'master' into eventlog-download 6e8156e [Hari Shreedharan] Simplify tests, use Guava stream copy methods. d8ddede [Hari Shreedharan] Remove unnecessary case in EventLogDownloadResource. ffffb53 [Hari Shreedharan] Changed interface to use zip stream. Added more tests. 1100b40 [Hari Shreedharan] Ensure that `Path` does not appear in interfaces, by rafactoring interfaces. 5a5f3e2 [Hari Shreedharan] Fix test ordering issue. 0b66948 [Hari Shreedharan] Minor formatting/import fixes. 4fc518c [Hari Shreedharan] Fix rat failures. a48b91f [Hari Shreedharan] Refactor to make attemptId optional in the API. Also added tests. 0fc1424 [Hari Shreedharan] File download now works for individual attempts and the entire application. 350d7e8 [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into eventlog-download fd6ab00 [Hari Shreedharan] Fix style issues 32b7662 [Hari Shreedharan] Use UIRoot directly in ApiRootResource. Also, use `Response` class to set headers. 7b362b2 [Hari Shreedharan] Almost working. 3d18ebc [Hari Shreedharan] [WIP] Try getting the event log download to work.
Replaced `fs.listFiles` with Hadoop-1 friendly `fs.listStatus` method. Author: Hari Shreedharan <[email protected]> Closes apache#6619 from harishreedharan/evetlog-hadoop-1-fix and squashes the following commits: 6192078 [Hari Shreedharan] [HOTFIX] Fix Hadoop-1 build caused by apache#5972.
...m History Server
This PR adds a new API that allows the user to download event logs for an application as a zip file. APIs have been added to download all logs for a given application or just for a specific attempt.
This also add an additional method to the ApplicationHistoryProvider to get the raw files, zipped.