flavray / avro-rs

Avro client library implementation in Rust
MIT License
169 stars 95 forks source link

Make writer block size configurable #119

Closed cpcloud closed 4 years ago

cpcloud commented 4 years ago

This PR makes block size configurable in Writer.

The approach uses the [typed_builder]() crate to enable this feature.

After this PR you can call the block_size method to construct a new writer using typed_builder:

let mut writer = Writer::builder().block_size(100).writer(writer).schema(&schema).build();

Without calling the block_size method the default value of 16000 is used.

poros commented 4 years ago

I took the liberty to fix a merge conflict in Cargo.toml with your other PR. Let me see if the tests pass, now

poros commented 4 years ago

It looks great, thanks for the contribution! :) I'll merge after the tests finish to run.