-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-6365] Add ZStandard compression support for Java SDK #7416
Conversation
Adds a dependency on `zstd-jni` which declares no transitive dependencies, but otherwise just fills out enum values to expose the ZStandard support that already exists in commons-compress.
cc @jkff who originally merged |
Run Python PreCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Awesome, super clean implementation nothing to say 👏
/** @see Compression#ZSTD */ | ||
ZSTD(Compression.ZSTD), | ||
|
||
/** @see Compression#DEFLATE */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
@@ -267,7 +290,7 @@ public void testCompressedAccordingToFilepatternGzip() throws Exception { | |||
verifyReadContents(input, tmpFile, null /* default auto decompression factory */); | |||
} | |||
|
|||
/** Test reading according to filepattern when the file is gzipped. */ | |||
/** Test reading according to filepattern when the file is bzipped. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other good catch good.
This adds a new dep for sdks/java/core. It is a pity that we don't have an extensible mechanism for new compression schemas. Has somebody proposed or discussed this @kennknowles? As usual I am afraid of possible conflict on dependencies. |
I will wait for the extra comment but probably will merge it ASAP. Thanks @jklukas ! |
We could move |
I think that the test idea brings a bit too much complexity. I was thinking more about having something like a |
Any comment on this one @kennknowles WDYT do we take the extension like approach or we merge as it is? Notice that zstd jar dep uses also JNI. |
Is it marked experimental? I think most new features should be, for a while. It might be hard to mark the right pieces of code, given how this fits in, but still seems a good idea. With that, I think as-is is fine. The implementation and tests are consistent with what we already have. I do think moving to an extension model would be a good improvement, and we can probably do it to all the pieces of the enum at the same time and this will not make it much harder. |
That sounds great. |
@jklukas I have been considering this PR since it does not add a compile time dependency (it 'only' depends on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will do some minor adjustments and merge manually.
Merged ! |
Adds a dependency on
zstd-jni
which declares no transitive dependencies,but otherwise just fills out enum values to expose the ZStandard support
that already exists in commons-compress.
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.It will help us expedite review of your Pull Request if you tag someone (e.g.
@username
) to look at it.Post-Commit Tests Status (on master branch)