Repository navigation
[GH-1951] Support zstd-compressed NetCDF4 in RS_FromNetCDF - #3379
Merged
Merged
Conversation
- Upgrade netCDF-Java (cdm-core) from 5.4.2 to 5.10.0, which loads HDF5 filters through the ucar.nc2.filter.FilterProvider service. - Add a Zstandard filter (HDF5 filter id 32015) backed by zstd-jni, which Spark already ships. zstd-jni is a provided dependency. - Document the supported compression filters and the new netCDF-Java version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[GH-XXX] my subject. Closes RS_FromNetCDF fails on NetCDF4/HDF5 with filter type=32015 (e.g. ZSTD) #1951What changes were proposed in this PR?
RS_FromNetCDFfailed on NetCDF4/HDF5 variables compressed with Zstandard (HDF5 filter 32015) withUnknown filter type=32015.cdm-core) from 5.4.2 to 5.10.0. In 5.4.2 the HDF5 filters are hardcoded. Since 5.5.0, netCDF-Java loads them through theucar.nc2.filter.FilterProviderservice. 5.10.0 is still Java 8 bytecode. On the transitive side, the only changes are version bumps of jcommander, joda-time, jdom2 and httpmime.ZstdFilterand registers it inMETA-INF/services/ucar.nc2.filter.FilterProvider. It decodes withzstd-jni, added as aprovideddependency because Spark 3.5, 4.0 and 4.1 already ship it.Unknown filter: no filter found with id 307). The docs now list the supported filters and thenccopy -F noneworkaround.How was this patch tested?
RasterConstructorsTest#testNetCdfZstdCompressed, using a small Zstandard-compressed fixture (test_zstd.nc4) generated with netCDF4-python. It checks the raster metadata and every pixel value.no filter found with id 32015.RasterConstructorsTest, plusnetcdfMetadataTestandrasteralgebraTest(Spark 3.5, Scala 2.13).Did this PR include necessary documentation updates?