Make the sync marker uniform for the Avro coalescing reader #5428
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.
This PR is to fix the issue #5312 by appending the same sync marker to every block that being coalesced into a single Avro file.
It has mainly
BatchContext
, and a new methodcreateBatchContext
in the parent class of the coalescing reader. This new method returns aBatchContext
who lives during the whole stage of building a coalesced memory file. By this design, the merged Avro header can be shared with the steps of estimating the output size, writing file header and building the block data for creating a batch.copyBlocksData
and GPU Avro coalescing reader to support writing a given sync marker.Performance on Local
CPU 12 cores, and one GPU (Titan V, with 12GB memory)
Non-partitioned 2000 avro files, 4.4GB in total in LOCAL storage
The numbers above show this change will not lead to any perf regression for the coalescing reader.
closes #5312
Signed-off-by: Firestarman firestarmanllc@gmail.com