Skip to content

[SPARK-20940][Core]Replace IllegalAccessError with IllegalStateException - #18168

Closed
zsxwing wants to merge 1 commit into
apache:masterfrom
zsxwing:SPARK-20940
Closed

[SPARK-20940][Core]Replace IllegalAccessError with IllegalStateException#18168
zsxwing wants to merge 1 commit into
apache:masterfrom
zsxwing:SPARK-20940

Conversation

@zsxwing

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

IllegalAccessError is a fatal error (a subclass of LinkageError) and its meaning is Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext (SPARK-20666 is an example of killing SparkContext due to IllegalAccessError). I think the correct type of exception in AccumulatorV2 should be IllegalStateException.

How was this patch tested?

Jenkins

@zsxwing

Copy link
Copy Markdown
MemberAuthor

cc @cloud-fan

@srowensrowen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, I wonder if an Error is thrown anywhere else. Really shouldn't be.

@cloud-fan

Copy link
Copy Markdown
Contributor

LGTM

@SparkQA

Copy link
Copy Markdown

Test build #77608 has finished for PR 18168 at commit 76601a7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Jun 1, 2017
…tion
## What changes were proposed in this pull request?
`IllegalAccessError` is a fatal error (a subclass of LinkageError) and its meaning is `Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to`. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext ([SPARK-20666](https://issues.apache.org/jira/browse/SPARK-20666) is an example of killing SparkContext due to `IllegalAccessError`). I think the correct type of exception in AccumulatorV2 should be `IllegalStateException`.
## How was this patch tested?
Jenkins
Author: Shixiong Zhu <shixiong@databricks.com>
Closes#18168 from zsxwing/SPARK-20940.
(cherry picked from commit 24db358)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
asfgit pushed a commit that referenced this pull request Jun 1, 2017
…tion
## What changes were proposed in this pull request?
`IllegalAccessError` is a fatal error (a subclass of LinkageError) and its meaning is `Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to`. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext ([SPARK-20666](https://issues.apache.org/jira/browse/SPARK-20666) is an example of killing SparkContext due to `IllegalAccessError`). I think the correct type of exception in AccumulatorV2 should be `IllegalStateException`.
## How was this patch tested?
Jenkins
Author: Shixiong Zhu <shixiong@databricks.com>
Closes#18168 from zsxwing/SPARK-20940.
(cherry picked from commit 24db358)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
asfgit pushed a commit that referenced this pull request Jun 1, 2017
…tion
## What changes were proposed in this pull request?
`IllegalAccessError` is a fatal error (a subclass of LinkageError) and its meaning is `Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to`. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext ([SPARK-20666](https://issues.apache.org/jira/browse/SPARK-20666) is an example of killing SparkContext due to `IllegalAccessError`). I think the correct type of exception in AccumulatorV2 should be `IllegalStateException`.
## How was this patch tested?
Jenkins
Author: Shixiong Zhu <shixiong@databricks.com>
Closes#18168 from zsxwing/SPARK-20940.
(cherry picked from commit 24db358)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
@zsxwing

Copy link
Copy Markdown
MemberAuthor

Thanks! Merging to master, 2.2, 2.1 and 2.0.

@zsxwing

Copy link
Copy Markdown
MemberAuthor

Lgtm, I wonder if an Error is thrown anywhere else. Really shouldn't be.

@srowen IllegalAccessError are not used in other places. However, I didn't search other types of errors.

@asfgitasfgit closed this in 24db358Jun 1, 2017
@zsxwing
zsxwing deleted the SPARK-20940 branch June 1, 2017 00:31
jzhuge pushed a commit to jzhuge/spark that referenced this pull request Aug 20, 2018
…tion
`IllegalAccessError` is a fatal error (a subclass of LinkageError) and its meaning is `Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to`. Throwing a fatal error for AccumulatorV2 is not necessary and is pretty bad because it usually will just kill executors or SparkContext ([SPARK-20666](https://issues.apache.org/jira/browse/SPARK-20666) is an example of killing SparkContext due to `IllegalAccessError`). I think the correct type of exception in AccumulatorV2 should be `IllegalStateException`.
Jenkins
Author: Shixiong Zhu <shixiong@databricks.com>
Closesapache#18168 from zsxwing/SPARK-20940.
(cherry picked from commit 24db358)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@zsxwing@cloud-fan@SparkQA@srowen