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-42242][BUILD] Upgrade snappy-java to 1.1.9.1 #39811

Closed
wants to merge 2 commits into from
Closed

[SPARK-42242][BUILD] Upgrade snappy-java to 1.1.9.1 #39811

wants to merge 2 commits into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jan 30, 2023

What changes were proposed in this pull request?

This PR aims to upgrade snappy-java to 1.1.9.1.

Why are the changes needed?

This version has the following bug fixes.

Here is the full release note.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass the CIs.

@github-actions github-actions bot added the BUILD label Jan 30, 2023
Copy link
Member Author

@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.

Hi, @viirya . Could you review this? This includes your two patches.

@viirya
Copy link
Member

viirya commented Jan 30, 2023

Thanks @dongjoon-hyun . Pending CI.

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya . Yes, pending CI!

@dongjoon-hyun
Copy link
Member Author

Oh...

java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
	at org.xerial.snappy.Snappy.compress(Snappy.java:157)

@dongjoon-hyun dongjoon-hyun marked this pull request as draft January 31, 2023 00:06
Copy link
Member Author

@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.

It seems that snappy-java is published via Java 11. I converted this PR as a draft for now.

@dongjoon-hyun
Copy link
Member Author

Sorry, @viirya and @HyukjinKwon . I will check the situation more.

Copy link
Contributor

@LuciferYang LuciferYang 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

@LuciferYang
Copy link
Contributor

https://github.com/xerial/snappy-java/blob/master/build.sbt#L30

image

Interesting. It seems that the compilation target is still Java 8...

@dongjoon-hyun
Copy link
Member Author

It's insufficient, @LuciferYang . The runtimeClass (rt.jar) is required during building. Otherwise, Java 11 assumes Java 11 rt.jar.

@srowen
Copy link
Member

srowen commented Jan 31, 2023

Looks like that overload isn't even in Java 11; I see it in Java 14: https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/nio/ByteBuffer.html#limit(int)
Yeah, this is not a question of which JVM you target, but of using methods not found in Java 8.

@dongjoon-hyun
Copy link
Member Author

Ya, thank you, @srowen .

@LuciferYang
Copy link
Contributor

https://github.com/xerial/snappy-java/releases/tag/v1.1.9.1

image

@dongjoon-hyun We can try to upgrade 1.1.9.1 to solve this issue

@dongjoon-hyun
Copy link
Member Author

Thank you so much!

@LuciferYang
Copy link
Contributor

It should not be released to the central repository yet. We need to wait for a while

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Jan 31, 2023

Yes, it seems to be. I'll wait~

[ERROR] Failed to execute goal on project spark-core_2.12: Could not resolve dependencies for project org.apache.spark:spark-core_2.12:jar:spark-185468:
Could not find artifact org.xerial.snappy:snappy-java:jar:1.1.9.1 in gcs-maven-central-mirror (https://maven-central.storage-download.googleapis.com/maven2/) -> [Help 1]

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-42242][BUILD] Upgrade snappy-java to 1.1.9.0 [SPARK-42242][BUILD] Upgrade snappy-java to 1.1.9.1 Feb 1, 2023
@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review February 1, 2023 03:36
@dongjoon-hyun
Copy link
Member Author

Thank you again, @viirya .

@dongjoon-hyun
Copy link
Member Author

Thank you, @LuciferYang .

dongjoon-hyun added a commit that referenced this pull request Feb 1, 2023
### What changes were proposed in this pull request?

This PR aims to upgrade `snappy-java` to 1.1.9.1.

### Why are the changes needed?

This version has the following bug fixes.

- Use original compressed and uncompressed buffer's position (xerial/snappy-java#293)
- Fixed running snappy-java as OSGi bundle on Apple Silicon (M1 Pro) (xerial/snappy-java#303)
- Avoid explicit class name in throw_exception (xerial/snappy-java#291)

Here is the full release note.
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.0
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.1

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

No.

### How was this patch tested?

Pass the CIs.

Closes #39811 from dongjoon-hyun/SPARK-42242.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 65a1c16)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member Author

All tests passed. Merged to master/3.4.
Thank you, @viirya , @HyukjinKwon , @LuciferYang , @srowen .

@dongjoon-hyun dongjoon-hyun deleted the SPARK-42242 branch February 1, 2023 06:15
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
### What changes were proposed in this pull request?

This PR aims to upgrade `snappy-java` to 1.1.9.1.

### Why are the changes needed?

This version has the following bug fixes.

- Use original compressed and uncompressed buffer's position (xerial/snappy-java#293)
- Fixed running snappy-java as OSGi bundle on Apple Silicon (M1 Pro) (xerial/snappy-java#303)
- Avoid explicit class name in throw_exception (xerial/snappy-java#291)

Here is the full release note.
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.0
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.1

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

No.

### How was this patch tested?

Pass the CIs.

Closes apache#39811 from dongjoon-hyun/SPARK-42242.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 65a1c16)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
senthh pushed a commit to acceldata-io/spark3 that referenced this pull request Aug 30, 2024
### What changes were proposed in this pull request?

This PR aims to upgrade `snappy-java` to 1.1.9.1.

### Why are the changes needed?

This version has the following bug fixes.

- Use original compressed and uncompressed buffer's position (xerial/snappy-java#293)
- Fixed running snappy-java as OSGi bundle on Apple Silicon (M1 Pro) (xerial/snappy-java#303)
- Avoid explicit class name in throw_exception (xerial/snappy-java#291)

Here is the full release note.
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.0
- https://github.com/xerial/snappy-java/releases/tag/v1.1.9.1

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

No.

### How was this patch tested?

Pass the CIs.

Closes apache#39811 from dongjoon-hyun/SPARK-42242.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 65a1c16)
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.

5 participants