Skip to content
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

ocfwriter: allow writing blocks #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanner-bruce
Copy link

Exports an AppendBlock function which Append uses. Our use case is that we have a go routine that sends batches of []map[string]interface{} over a channel and a reader which then Appends it to a block. This forces us to compress and append smaller blocks for each batch we receive. This code change allows us to build up the block over time, by converting (using codec) on the fly, appending to a block, and compressing at the same time. We can then compress all data into a single data block.

In the worst case, calling Append many times was more than doubling, and almost tripling, the actual file sizes compared to calling Append a few times per file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant