Skip to content
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-32824][Core] Improve the error message when the user forgets the .amount in a resource config #29685

Closed
wants to merge 2 commits into from

Conversation

tgravescs
Copy link
Contributor

@tgravescs tgravescs commented Sep 8, 2020

What changes were proposed in this pull request?

If the user forgets to specify .amount on a resource config like spark.executor.resource.gpu, the error message thrown is very confusing:

ERROR SparkContext: Error initializing SparkContext.java.lang.StringIndexOutOfBoundsException: String index out of range: 
-1 at java.lang.String.substring(String.java:1967) at 

This makes it so we have a readable error thrown

Why are the changes needed?

confusing error for users

Does this PR introduce any user-facing change?

just error message

How was this patch tested?

Tested manually on standalone cluster

@tgravescs tgravescs changed the title [SPARK-32824] Improve the error message when the user forgets the .amount in a resource config [SPARK-32824][Core] Improve the error message when the user forgets the .amount in a resource config Sep 8, 2020
@SparkQA
Copy link

SparkQA commented Sep 8, 2020

Test build #128421 has finished for PR 29685 at commit db665a1.

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

@HyukjinKwon
Copy link
Member

Merged to master and branch-3.0.

HyukjinKwon pushed a commit that referenced this pull request Sep 9, 2020
…he .amount in a resource config

### What changes were proposed in this pull request?

If the user forgets to specify .amount on a resource config like spark.executor.resource.gpu, the error message thrown is very confusing:

```
ERROR SparkContext: Error initializing SparkContext.java.lang.StringIndexOutOfBoundsException: String index out of range:
-1 at java.lang.String.substring(String.java:1967) at
```

This makes it so we have a readable error thrown

### Why are the changes needed?

confusing error for users
### Does this PR introduce _any_ user-facing change?

just error message

### How was this patch tested?

Tested manually on standalone cluster

Closes #29685 from tgravescs/SPARK-32824.

Authored-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit e8634d8)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member

@tgravescs, it's just nothing but my curiosity, why don't you add your NVIDIA email into your GitHub account so the commit links your GitHub account :-)?

@tgravescs
Copy link
Contributor Author

no particular reason, thanks for pointing it out.
Did this merge to 3.0 ok? I was expecting it not to due to the resource profile changes but hadn't checked yet

@HyukjinKwon
Copy link
Member

Yeah, there was no conflict and tests passed (e86d90b).

@tgravescs
Copy link
Contributor Author

great thanks

holdenk pushed a commit to holdenk/spark that referenced this pull request Oct 27, 2020
…he .amount in a resource config

### What changes were proposed in this pull request?

If the user forgets to specify .amount on a resource config like spark.executor.resource.gpu, the error message thrown is very confusing:

```
ERROR SparkContext: Error initializing SparkContext.java.lang.StringIndexOutOfBoundsException: String index out of range:
-1 at java.lang.String.substring(String.java:1967) at
```

This makes it so we have a readable error thrown

### Why are the changes needed?

confusing error for users
### Does this PR introduce _any_ user-facing change?

just error message

### How was this patch tested?

Tested manually on standalone cluster

Closes apache#29685 from tgravescs/SPARK-32824.

Authored-by: Thomas Graves <tgraves@nvidia.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit e8634d8)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants