-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-5760][SPARK-5761] Fix standalone rest protocol corner cases + revamp tests #4557
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
Conversation
Major changes include:
(1) The server used to always send the JSON to the servlet's
output stream. However, if the response code is not 200,
the client must actually read from the error stream. Now
the server writes to the correct stream depending on the
response code.
(2) If the server throws an internal exception, both the
output stream and the error stream on the client side
is null (not empty). This was not previously accounted
for and could lead to NPEs.
(3) The default error handling servlet did not match the
URL cases correctly, because there used to always be
an empty string in the list. This is now filtered out.
Conflicts: core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala
|
Test build #27331 has started for PR 4557 at commit
|
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.
This fixes (2) on SPARK-5760
b1f3482 to
d82d971
Compare
|
Test build #27335 has started for PR 4557 at commit
|
|
Test build #27331 has finished for PR 4557 at commit
|
|
Test PASSed. |
|
Test build #27335 has finished for PR 4557 at commit
|
|
Test PASSed. |
|
Test build #27363 has started for PR 4557 at commit
|
|
Test build #27363 has finished for PR 4557 at commit
|
|
Test PASSed. |
|
Alright merging into master and 1.3. |
…revamp tests The changes are summarized in the commit message. Test or test-related code accounts for 90% of the lines changed. Author: Andrew Or <[email protected]> Closes #4557 from andrewor14/rest-tests and squashes the following commits: b4dc980 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest-tests b55e40f [Andrew Or] Add test for unknown fields cc96993 [Andrew Or] private[spark] -> private[rest] 578cf45 [Andrew Or] Clean up test code a little d82d971 [Andrew Or] v1 -> serverVersion ea48f65 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest-tests 00999a8 [Andrew Or] Revamp tests + fix a few corner cases (cherry picked from commit 1d5663e) Signed-off-by: Andrew Or <[email protected]>
The changes are summarized in the commit message. Test or test-related code accounts for 90% of the lines changed.