-
Notifications
You must be signed in to change notification settings - Fork 601
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
iceberg: add batching parquet writer factory #23683
Merged
ivotron
merged 7 commits into
redpanda-data:dev
from
jcipar:jcipar/batching-writer-factory
Oct 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b66741a
datalake: batching_parquet_writer factory and tests
jcipar ff42c26
datalake: error logging in batching_parquet_writer
jcipar a08a847
datalake: use result type for data_writer_factory::create
jcipar 92d1dff
datalake: multiplexer handles failure to create writer
jcipar bb40926
datalake: use coordinator::data_file in parquet writer
jcipar 91a3c70
datalake: modify multiplexer to return translated_offset_range
jcipar 06e20c6
datalake: suppress alignment errors from Arrow
jcipar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
#pragma once | ||
|
||
#include "base/outcome.h" | ||
#include "coordinator/data_file.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. datalake/coordinator/data_file.h |
||
#include "datalake/schemaless_translator.h" | ||
#include "iceberg/datatypes.h" | ||
#include "iceberg/values.h" | ||
|
@@ -25,17 +26,6 @@ enum class data_writer_error { | |
file_io_error, | ||
}; | ||
|
||
struct data_writer_result | ||
: serde::envelope< | ||
data_writer_result, | ||
serde::version<0>, | ||
serde::compat_version<0>> { | ||
ss::sstring file_path = ""; | ||
size_t record_count = 0; | ||
size_t file_size_bytes = 0; | ||
|
||
auto serde_fields() { return std::tie(record_count); } | ||
}; | ||
|
||
struct data_writer_error_category : std::error_category { | ||
const char* name() const noexcept override { return "Data Writer Error"; } | ||
|
@@ -69,7 +59,7 @@ class data_writer { | |
iceberg::struct_value /* data */, int64_t /* approx_size */) | ||
= 0; | ||
|
||
virtual ss::future<result<data_writer_result, data_writer_error>> | ||
virtual ss::future<result<coordinator::data_file, data_writer_error>> | ||
finish() = 0; | ||
}; | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: could have also made this a nested class so it would be
batching_parquet_writer::factory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given the number of things stacked above this, and how pervasive a change that would be, I'd rather make it a separate PR.