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-49879][CORE] Move TransportCipherUtil to a separate file to eliminate Java compilation warnings #48352

Closed

Conversation

LuciferYang
Copy link
Contributor

What changes were proposed in this pull request?

Run build/mvn clean install -pl common/network-common, we can see the following compilation warnings:

[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/CtrTransportCipher.java:73:11:  
auxiliary class TransportCipherUtil in /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/TransportCipher.java should not be accessed from outside its own source file
[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/GcmTransportCipher.java:63:15:
auxiliary class TransportCipherUtil in /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/TransportCipher.java should not be accessed from outside its own source file

So this pr moves TransportCipherUtil to a separate file to eliminate the aforementioned Java compilation warnings.

Why are the changes needed?

Fix compilation warnings.

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • Pass GitHub Actions
  • locally run build/mvn clean install -pl common/network-common, no longer have the aforementioned compilation warnings.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the CORE label Oct 4, 2024
/*
* This method is used for testing to verify key derivation.
*/
@VisibleForTesting
Copy link
Member

Choose a reason for hiding this comment

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

Shall we use 2-space indentation, @LuciferYang ? Although it follows the original source, we had better change the style according to the Apache Spark community policy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

3b10ead reformatted TransportCipherUtil.java

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 (except a minor indentation comment)

@dongjoon-hyun
Copy link
Member

Thank you, @LuciferYang .

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.

Pending CIs.

@dongjoon-hyun
Copy link
Member

Merged to master. Thank you, @LuciferYang and @MaxGekk .

@LuciferYang
Copy link
Contributor Author

Thanks @dongjoon-hyun and @MaxGekk

himadripal pushed a commit to himadripal/spark that referenced this pull request Oct 19, 2024
…eliminate Java compilation warnings

### What changes were proposed in this pull request?
Run `build/mvn clean install -pl common/network-common`, we can see the following compilation warnings:

```
[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/CtrTransportCipher.java:73:11:
auxiliary class TransportCipherUtil in /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/TransportCipher.java should not be accessed from outside its own source file
[WARNING] [Warn] /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/GcmTransportCipher.java:63:15:
auxiliary class TransportCipherUtil in /Users/yangjie01/SourceCode/git/spark-maven/common/network-common/src/main/java/org/apache/spark/network/crypto/TransportCipher.java should not be accessed from outside its own source file
```

So this pr moves `TransportCipherUtil` to a separate file to eliminate the aforementioned Java compilation warnings.

### Why are the changes needed?
Fix compilation warnings.

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

### How was this patch tested?
- Pass GitHub Actions
- locally run `build/mvn clean install -pl common/network-common`, no longer have the aforementioned compilation warnings.

### Was this patch authored or co-authored using generative AI tooling?
No

Closes apache#48352 from LuciferYang/Move-TransportCipherUtil.

Authored-by: yangjie01 <yangjie01@baidu.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