Skip to content

Commit 6db4371

Browse files
authored
Add support for Gzip compression for the JSON format on Filesystem connector (V1 and V2) (ArroyoSystems#1007)
* Add support for Gzip compression for the JSON format on Filesystem connector (V1 and V2) This patch adds support for compression when using the JSON format with the Filsystem connector (V1 and V2). The compression algorithm can be specified using the `json.compression` configuration knob. At the moment, only `gzip` or `uncompressed` are supported; the default is `uncompressed`. Note that local filesystem is currently **not** supported. * Make JsonCompression an Option and add config validation for JSON compression The `JsonCompression` enum now only contains actual compression algorithms, no more `Uncompressed`. To convey that something shouldn't be compressed, we now use the `Option::None`. This patch also adds some config validation; that ensures that the connector is `filesystem` when `json.compression` is set. * Address comments and move to a streaming compressor This patch addresses the comments from ArroyoSystems#1007. It also moves to compressing the JSON in a streaming fashion, instead of buffering in-memory. * Address comments 1. Add comment to explain why expect won't panic 2. Model the buffer as an enum. This provides better typing support
1 parent ed4ea0e commit 6db4371

13 files changed

Lines changed: 440 additions & 30 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/arroyo-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ impl IntoResponse for HttpError {
327327
SchemaDefinition,
328328
TestSourceMessage,
329329
JsonFormat,
330+
JsonCompression,
330331
AvroFormat,
331332
ProtobufFormat,
332333
ParquetFormat,

crates/arroyo-connectors/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ object_store = { workspace = true }
9595
deltalake = { workspace = true, features = ["s3", "gcs"] }
9696
delta_kernel = { workspace = true, features = ["arrow-55", "arrow-conversion"] }
9797
async-compression = { version = "0.4.3", features = ["tokio", "zstd", "gzip"] }
98+
flate2 = "1.0.30"
9899
iceberg = { version = "0.6.0" }
99100
iceberg-catalog-rest = "0.6.0"
100101
apache-avro = {workspace = true}

0 commit comments

Comments
 (0)