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-39657][YARN] YARN AM client should call the non-static setTokensConf method #37050

Closed
wants to merge 1 commit into from

Conversation

sunchao
Copy link
Member

@sunchao sunchao commented Jul 1, 2022

What changes were proposed in this pull request?

This fixes a bug in the original SPARK-37205 PR, where we treat the method setTokensConf as a static method, but it should be non-static instead.

Why are the changes needed?

The method setTokensConf is non-static so the current code will fail:

06/29/2022 - 17:28:16  - Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
06/29/2022 - 17:28:16  - at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Does this PR introduce any user-facing change?

No

How was this patch tested?

Manually tested this change internally and it now works.

@github-actions github-actions bot added the YARN label Jul 1, 2022
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Jul 1, 2022
…nsConf method

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

This fixes a bug in the original SPARK-37205 PR, where we treat the method `setTokensConf` as a static method, but it should be non-static instead.

### Why are the changes needed?

The method `setTokensConf` is non-static so the current code will fail:
```
06/29/2022 - 17:28:16  - Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
06/29/2022 - 17:28:16  - at java.base/java.lang.reflect.Method.invoke(Method.java:566)
```

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Manually tested this change internally and it now works.

Closes #37050 from sunchao/SPARK-39657.

Authored-by: Chao Sun <sunchao@apple.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 6624d91)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member

Merged to master/3.3. Thank you for filing a new JIRA, @sunchao .

@sunchao
Copy link
Member Author

sunchao commented Jul 1, 2022

Thanks @dongjoon-hyun !

@mridulm
Copy link
Contributor

mridulm commented Jul 4, 2022

Wondering why this was not caught in the tests earlier. Are we missing test coverage ?

sunchao added a commit to sunchao/spark that referenced this pull request Jun 2, 2023
…nsConf method

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

This fixes a bug in the original SPARK-37205 PR, where we treat the method `setTokensConf` as a static method, but it should be non-static instead.

### Why are the changes needed?

The method `setTokensConf` is non-static so the current code will fail:
```
06/29/2022 - 17:28:16  - Exception in thread "main" java.lang.IllegalArgumentException: object is not an instance of declaring class
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
06/29/2022 - 17:28:16  - at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
06/29/2022 - 17:28:16  - at java.base/java.lang.reflect.Method.invoke(Method.java:566)
```

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

Manually tested this change internally and it now works.

Closes apache#37050 from sunchao/SPARK-39657.

Authored-by: Chao Sun <sunchao@apple.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants