Repository navigation
feat(firehose): deliver Xerial Snappy-compressed S3 objects - #2746
Merged
Merged
Conversation
This was referenced Oct 18, 2026
vieiralucas
force-pushed
the
feat/firehose-snappy
branch
from
October 18, 2026 17:43
c5907ef to
a90d920
Compare
Member
|
Thanks a lot for this, @cavanaug. Snappy output that matches what real Firehose writes (the Xerial/snappy-java container, |
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.
Summary
Part 3 of the Firehose S3 delivery series tracked in #2708. Stacked on GZIP #2745 and its metadata-aware S3 writer: until #2745 merges, this diff also contains its commits, and the Snappy changes are the commits from
feat(firehose): support Xerial Snappy delivery to S3onward.Snappycompression format using pure-Rust raw Snappy blocks (snap1.1.2, BSD-3-Clause, no dependencies, compression only) in the Xerial/snappy-java container..snappy,Content-Type: application/octet-stream, andContent-Encoding: snappy-java, preserving extension overrides, metadata, exact decoded bytes, and persistent restart behavior.SnappyOutputStreamdoes; each block is compressed independently. Test decoding is independent and bounded.UpdateDestinationcoverage. Java is not a runtime or test dependency.Why the Xerial container
Three incompatible Snappy containers exist. A published probe of real Amazon Data Firehose (floci-io/floci#2328, eu-west-1, 2026-08-15) found that
CompressionFormat: Snappywrites.snappyobjects withContent-Type: application/octet-stream,Content-Encoding: snappy-java, and the Xerial header82 53 4e 41 50 50 59 00; snappy-java 1.1.10.8'sSnappyOutputStreamreproduced the AWS object byte for byte, whileHADOOP_SNAPPYused Hadoop block framing withContent-Encoding: hadoop-snappy(still rejected at admission here). That probe delivered one 690-byte payload, so it confirms the header, metadata, and records sharing a block; the 32,768-byte block size for larger payloads follows snappy-java's default. The container bytes were also checked against snappy-java 1.1.10.8'sSnappyCodec/SnappyOutputStreamsource. Compressed bytes may differ from AWS's (encoder heuristics), but decoded bytes and framing match.Test plan
c5907ef3a(stacked on GZIPdfd71471c, upstream774c772d6): 1,727 focused CloudFormation/Firehose/Logs/S3 unit tests, 86 rebuilt-server codec/admission/SES/checksum/persistence/encryption/write-side-effect SDK tests, one Athena regression, and 107 Firehose/SES/S3 conformance tests.127.0.0.1:54321), independently reproduced on upstream. Snappy's final focused run does not claim that its workspace gate passes; no test exclusions were added. Revalidate after rebasing onto the merged predecessor before submission.Series context
Refs #2708; does not close the tracking issue. Depends on #2745; branch
feat/firehose-snappyis stacked onfeat/firehose-gzip. Once #2745 merges, I will rebase ontomainso only the Snappy commits remain and revalidate. Size/time buffering follows, stacked on this PR, in #2747.