Registry for FileIO implementations.
More...
#include <file_io_registry.h>
|
|
using | Factory = std::function< Result< std::unique_ptr< FileIO > >(const std::unordered_map< std::string, std::string > &properties)> |
| | Factory function type for creating FileIO instances.
|
| |
|
| static void | Register (const std::string &name, Factory factory) |
| | Register a FileIO factory under the given name.
|
| |
| static Result< std::unique_ptr< FileIO > > | Load (const std::string &name, const std::unordered_map< std::string, std::string > &properties) |
| | Load a FileIO implementation by name.
|
| |
|
|
static constexpr std::string_view | kArrowLocalFileIO = "arrow-fs-local" |
| |
|
static constexpr std::string_view | kArrowS3FileIO = "arrow-fs-s3" |
| |
Registry for FileIO implementations.
Provides a mechanism to register and load FileIO implementations by name. This allows the REST catalog (and others) to resolve FileIO implementations at runtime based on configuration properties like "io-impl".
◆ Load()
| Result< std::unique_ptr< FileIO > > iceberg::FileIORegistry::Load |
( |
const std::string & |
name, |
|
|
const std::unordered_map< std::string, std::string > & |
properties |
|
) |
| |
|
static |
Load a FileIO implementation by name.
- Parameters
-
| name | The implementation name to look up. |
| properties | Configuration properties to pass to the factory. |
- Returns
- A unique_ptr to the FileIO instance, or an error if not found.
◆ Register()
| void iceberg::FileIORegistry::Register |
( |
const std::string & |
name, |
|
|
Factory |
factory |
|
) |
| |
|
static |
Register a FileIO factory under the given name.
- Parameters
-
| name | The implementation name (e.g., "local", "s3") |
| factory | The factory function that creates the FileIO instance. |
The documentation for this class was generated from the following files: