-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23822 from mmaslankaprv/datalake-mux-2
Loosen coupling of `datalake::record_multiplexer`
- Loading branch information
Showing
12 changed files
with
132 additions
and
92 deletions.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright 2024 Redpanda Data, Inc. | ||
* | ||
* Licensed as a Redpanda Enterprise file under the Redpanda Community | ||
* License (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md | ||
*/ | ||
#include "datalake/base_types.h" | ||
|
||
#include <fmt/core.h> | ||
namespace datalake { | ||
std::ostream& operator<<(std::ostream& o, const local_file_metadata& f_meta) { | ||
fmt::print( | ||
o, | ||
"{{relative_path: {}, size_bytes: {}, row_count: {}, hour: {}}}", | ||
f_meta.path, | ||
f_meta.size_bytes, | ||
f_meta.row_count, | ||
f_meta.hour); | ||
return o; | ||
} | ||
} // namespace datalake |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2024 Redpanda Data, Inc. | ||
* | ||
* Licensed as a Redpanda Enterprise file under the Redpanda Community | ||
* License (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* https://github.com/redpanda-data/redpanda/blob/master/licenses/rcl.md | ||
*/ | ||
#pragma once | ||
#include "utils/named_type.h" | ||
|
||
#include <filesystem> | ||
namespace datalake { | ||
/** | ||
* Definitions of local and remote paths, as the name indicates the local path | ||
* is always pointing to the location on local disk wheras the remote path is a | ||
* path of the object in the object store. | ||
*/ | ||
using local_path = named_type<std::filesystem::path, struct local_path_tag>; | ||
using remote_path = named_type<std::filesystem::path, struct remote_path_tag>; | ||
|
||
/** | ||
* Simple type describing local parquet file metadata with its path and basic | ||
* statistics | ||
*/ | ||
struct local_file_metadata { | ||
local_path path; | ||
size_t row_count = 0; | ||
size_t size_bytes = 0; | ||
int hour = 0; | ||
|
||
friend std::ostream& | ||
operator<<(std::ostream& o, const local_file_metadata& r); | ||
}; | ||
} // namespace datalake |
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
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
Oops, something went wrong.