iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
iceberg::rest::RestCatalogProperties Class Reference

Configuration class for a REST Catalog. More...

#include <catalog_properties.h>

Inheritance diagram for iceberg::rest::RestCatalogProperties:
iceberg::ConfigBase< RestCatalogProperties >

Public Types

template<typename T >
using Entry = const ConfigBase< RestCatalogProperties >::Entry< T >
 

Public Member Functions

std::unordered_map< std::string, std::string > ExtractHeaders () const
 Returns HTTP headers to be added to every request.
 
Result< std::string_view > Uri () const
 Get the URI of the REST catalog server.
 
Result< SnapshotModeSnapshotLoadingMode () const
 Get the snapshot loading mode.
 
- Public Member Functions inherited from iceberg::ConfigBase< RestCatalogProperties >
ConfigBaseSet (const Entry< T > &entry, const T &val)
 
ConfigBaseUnset (const Entry< T > &entry)
 
ConfigBaseReset ()
 
Get (const Entry< T > &entry) const
 
const std::unordered_map< std::string, std::string > & configs () const
 
std::unordered_map< std::string, std::string > & mutable_configs ()
 
std::unordered_map< std::string, std::string > Extract (std::string_view prefix) const
 Extracts the prefix from the configuration.
 

Static Public Member Functions

static RestCatalogProperties default_properties ()
 Create a default RestCatalogProperties instance.
 
static RestCatalogProperties FromMap (std::unordered_map< std::string, std::string > properties)
 Create a RestCatalogProperties instance from a map of key-value pairs.
 

Static Public Attributes

static Entry< std::string > kUri {"uri", ""}
 The URI of the REST catalog server.
 
static Entry< std::string > kName {"name", ""}
 The name of the catalog.
 
static Entry< std::string > kWarehouse {"warehouse", ""}
 The warehouse path.
 
static Entry< std::string > kIOImpl {"io-impl", ""}
 The FileIO implementation name.
 
static Entry< std::string > kPrefix {"prefix", ""}
 The optional prefix for REST API paths.
 
static Entry< std::string > kNamespaceSeparator {"namespace-separator", "%1F"}
 The encoded separator used to join namespace levels in REST paths.
 
static Entry< std::string > kSnapshotLoadingMode {"snapshot-loading-mode", "ALL"}
 The snapshot loading mode (ALL or REFS).
 
static Entry< std::string > kMetricsReportingEnabled
 Whether to report metrics to the REST catalog server (default: true).
 
static constexpr std::string_view kHeaderPrefix = "header."
 The prefix for HTTP headers.
 

Additional Inherited Members

- Protected Attributes inherited from iceberg::ConfigBase< RestCatalogProperties >
std::unordered_map< std::string, std::string > configs_
 

Detailed Description

Configuration class for a REST Catalog.

Member Function Documentation

◆ SnapshotLoadingMode()

Result< SnapshotMode > iceberg::rest::RestCatalogProperties::SnapshotLoadingMode ( ) const

Get the snapshot loading mode.

Returns
SnapshotMode::kAll if configured as "ALL", SnapshotMode::kRefs if "REFS", or an error if the value is invalid. Parsing is case-insensitive to match Java behavior.

◆ Uri()

Result< std::string_view > iceberg::rest::RestCatalogProperties::Uri ( ) const

Get the URI of the REST catalog server.

Returns
The URI if configured, or an error if not set or empty.

Member Data Documentation

◆ kMetricsReportingEnabled

Entry<std::string> iceberg::rest::RestCatalogProperties::kMetricsReportingEnabled
inlinestatic
Initial value:
{
"rest-metrics-reporting-enabled", "true"}

Whether to report metrics to the REST catalog server (default: true).


The documentation for this class was generated from the following file: