Skip to content

Commit

Permalink
datalake/coordinator: add hour to data file
Browse files Browse the repository at this point in the history
  • Loading branch information
andrwng committed Oct 9, 2024
1 parent 0557f91 commit 5fd7f69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/v/datalake/coordinator/data_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ namespace datalake::coordinator {

std::ostream& operator<<(std::ostream& o, const data_file& f) {
o << fmt::format(
"{{remote_path: {}, row_count: {}, file_size_bytes: {}}}",
"{{remote_path: {}, row_count: {}, file_size_bytes: {}, hour: {}}}",
f.remote_path,
f.row_count,
f.file_size_bytes);
f.file_size_bytes,
f.hour);
return o;
}

Expand Down
3 changes: 2 additions & 1 deletion src/v/datalake/coordinator/data_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ namespace datalake::coordinator {
struct data_file
: serde::envelope<data_file, serde::version<0>, serde::compat_version<0>> {
auto serde_fields() {
return std::tie(remote_path, row_count, file_size_bytes);
return std::tie(remote_path, row_count, file_size_bytes, hour);
}
ss::sstring remote_path = "";
size_t row_count = 0;
size_t file_size_bytes = 0;
int hour = 0;
// TODO: add kafka schema id
};

Expand Down

0 comments on commit 5fd7f69

Please sign in to comment.