Uh oh!
There was an error while loading. Please reload this page.
[SPARK-18164][SQL]ForeachSink should fail the Spark job if process throws exception - #15674
Closed
zsxwing wants to merge 2 commits into
Closed
[SPARK-18164][SQL]ForeachSink should fail the Spark job if process throws exception#15674zsxwing wants to merge 2 commits into
process throws exception#15674zsxwing wants to merge 2 commits into
Conversation
zsxwing
commented
Oct 28, 2016
MemberAuthor
cc @tdas |
SparkQA
commented
Oct 28, 2016
Test build #67715 has finished for PR 15674 at commit
|
tdas
reviewed
Oct 28, 2016
| writer.close(e) | ||
| throw e | ||
| } | ||
| if (!isFailed) { |
Contributor
There was a problem hiding this comment.
I think there is a better of write this now using try...catch...finally. Because the condition here will always be true
tdas
reviewed
Oct 28, 2016
| writer.process(iter.next()) | ||
| } | ||
| } catch { | ||
| case e: Throwable => |
Contributor
There was a problem hiding this comment.
wait.. isnt it simpler to do
try {
...
} catch {
case e => logError(.....)
throw e
} finally {
writer.close(e)
}
MemberAuthor
There was a problem hiding this comment.
cannot access e inside finally.
Contributor
LGTM pending tests. Should merge to master and 2.0 |
SparkQA
commented
Oct 29, 2016
Test build #67730 has finished for PR 15674 at commit
|
zsxwing
commented
Oct 29, 2016
MemberAuthor
Merging to master and 2.0. Thanks, @tdas |
asfgit pushed a commit
that referenced
this pull request
Oct 29, 2016
… throws exception ## What changes were proposed in this pull request? Fixed the issue that ForeachSink didn't rethrow the exception. ## How was this patch tested? The fixed unit test. Author: Shixiong Zhu <shixiong@databricks.com> Closes#15674 from zsxwing/foreach-sink-error. (cherry picked from commit 59cccbd) Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
robert3005 pushed a commit
to palantir/spark
that referenced
this pull request
Nov 1, 2016
… throws exception ## What changes were proposed in this pull request? Fixed the issue that ForeachSink didn't rethrow the exception. ## How was this patch tested? The fixed unit test. Author: Shixiong Zhu <shixiong@databricks.com> Closesapache#15674 from zsxwing/foreach-sink-error.
uzadude pushed a commit
to uzadude/spark
that referenced
this pull request
Jan 27, 2017
… throws exception ## What changes were proposed in this pull request? Fixed the issue that ForeachSink didn't rethrow the exception. ## How was this patch tested? The fixed unit test. Author: Shixiong Zhu <shixiong@databricks.com> Closesapache#15674 from zsxwing/foreach-sink-error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fixed the issue that ForeachSink didn't rethrow the exception.
How was this patch tested?
The fixed unit test.