-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-11195][CORE] Use correct classloader for TaskResultGetter #9779
Conversation
Make sure we are using the context classloader when deserializing failed TaskResults instead of the Spark classloader. Adds a test in TaskResultGetterSuite that compiles a custom exception, throws it on the executor, and asserts that Spark handles the TaskResult deserialization properly.
@yhuai any other comments? |
ok to test |
Test build #46124 has finished for PR 9779 at commit
|
* Before this fix, enqueueFailedTask would throw a ClassNotFoundException when deserializing | ||
* the exception, resulting in an UnknownReason for the TaskEndResult. | ||
*/ | ||
test("failed task deserialized with the correct classloader") { |
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 would put the (SPARK-11195)
in the test name to be consistent with other tests.
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.
++
Test build #46192 has finished for PR 9779 at commit
|
LGTM. Merging to master and branch 1.6. I will try to cherry-pick it to 1.5. If there is no major conflict, we will not need a 1.5 specific pr. |
Thank you for the fix! |
Make sure we are using the context classloader when deserializing failed TaskResults instead of the Spark classloader. The issue is that `enqueueFailedTask` was using the incorrect classloader which results in `ClassNotFoundException`. Adds a test in TaskResultGetterSuite that compiles a custom exception, throws it on the executor, and asserts that Spark handles the TaskResult deserialization instead of returning `UnknownReason`. See #9367 for previous comments See SPARK-11195 for a full repro Author: Hurshal Patel <hpatel516@gmail.com> Closes #9779 from choochootrain/spark-11195-master. (cherry picked from commit 3cca5ff) Signed-off-by: Yin Huai <yhuai@databricks.com>
Make sure we are using the context classloader when deserializing failed TaskResults instead of the Spark classloader. The issue is that `enqueueFailedTask` was using the incorrect classloader which results in `ClassNotFoundException`. Adds a test in TaskResultGetterSuite that compiles a custom exception, throws it on the executor, and asserts that Spark handles the TaskResult deserialization instead of returning `UnknownReason`. See #9367 for previous comments See SPARK-11195 for a full repro Author: Hurshal Patel <hpatel516@gmail.com> Closes #9779 from choochootrain/spark-11195-master. (cherry picked from commit 3cca5ff) Signed-off-by: Yin Huai <yhuai@databricks.com> Conflicts: core/src/main/scala/org/apache/spark/TestUtils.scala
I have merged this PR to branch master, 1.6, and 1.5. There was a minor conflict with 1.5 branch. But, I fixed it. |
Make sure we are using the context classloader when deserializing failed TaskResults instead of the Spark classloader.
The issue is that
enqueueFailedTask
was using the incorrect classloader which results inClassNotFoundException
.Adds a test in TaskResultGetterSuite that compiles a custom exception, throws it on the executor, and asserts that Spark handles the TaskResult deserialization instead of returning
UnknownReason
.See #9367 for previous comments
See SPARK-11195 for a full repro