|
iceberg-cpp
|
Rest catalog implementation. More...
#include <rest_catalog.h>
Public Member Functions | |
| RestCatalog (const RestCatalog &)=delete | |
| RestCatalog & | operator= (const RestCatalog &)=delete |
| RestCatalog (RestCatalog &&)=delete | |
| RestCatalog & | operator= (RestCatalog &&)=delete |
| std::string_view | name () const override |
| Return the name for this catalog. | |
| Result< std::vector< Namespace > > | ListNamespaces (const Namespace &ns) const override |
| List child namespaces from the given namespace. | |
| Status | CreateNamespace (const Namespace &ns, const std::unordered_map< std::string, std::string > &properties) override |
| Create a namespace with associated properties. | |
| Result< std::unordered_map< std::string, std::string > > | GetNamespaceProperties (const Namespace &ns) const override |
| Get metadata properties for a namespace. | |
| Status | DropNamespace (const Namespace &ns) override |
| Drop a namespace. | |
| Result< bool > | NamespaceExists (const Namespace &ns) const override |
| Check whether the namespace exists. | |
| Status | UpdateNamespaceProperties (const Namespace &ns, const std::unordered_map< std::string, std::string > &updates, const std::unordered_set< std::string > &removals) override |
| Update a namespace's properties by applying additions and removals. | |
| Result< std::vector< TableIdentifier > > | ListTables (const Namespace &ns) const override |
| Return all the identifiers under this namespace. | |
| Result< std::shared_ptr< Table > > | CreateTable (const TableIdentifier &identifier, const std::shared_ptr< Schema > &schema, const std::shared_ptr< PartitionSpec > &spec, const std::shared_ptr< SortOrder > &order, const std::string &location, const std::unordered_map< std::string, std::string > &properties) override |
| Create a table. | |
| Result< std::shared_ptr< Table > > | UpdateTable (const TableIdentifier &identifier, const std::vector< std::unique_ptr< TableRequirement > > &requirements, const std::vector< std::unique_ptr< TableUpdate > > &updates) override |
| Update a table. | |
| Result< std::shared_ptr< Transaction > > | StageCreateTable (const TableIdentifier &identifier, const std::shared_ptr< Schema > &schema, const std::shared_ptr< PartitionSpec > &spec, const std::shared_ptr< SortOrder > &order, const std::string &location, const std::unordered_map< std::string, std::string > &properties) override |
| Start a transaction to create a table. | |
| Result< bool > | TableExists (const TableIdentifier &identifier) const override |
| Check whether table exists. | |
| Status | RenameTable (const TableIdentifier &from, const TableIdentifier &to) override |
| Rename a table. | |
| Status | DropTable (const TableIdentifier &identifier, bool purge) override |
| Drop a table; optionally delete data and metadata files. | |
| Result< std::shared_ptr< Table > > | LoadTable (const TableIdentifier &identifier) override |
| Load a table. | |
| Result< std::shared_ptr< Table > > | RegisterTable (const TableIdentifier &identifier, const std::string &metadata_file_location) override |
| Register a table with the catalog if it does not exist. | |
Static Public Member Functions | |
| static Result< std::shared_ptr< RestCatalog > > | Make (const RestCatalogProperties &config) |
| Create a RestCatalog instance. | |
Rest catalog implementation.
|
overridevirtual |
Create a namespace with associated properties.
| ns | the namespace to create |
| properties | a key-value map of metadata for the namespace |
Implements iceberg::Catalog.
|
overridevirtual |
Create a table.
| identifier | a table identifier |
| schema | a schema |
| spec | a partition spec |
| order | a sort order |
| location | a location for the table; leave empty if unspecified |
| properties | a string map of table properties |
Implements iceberg::Catalog.
|
overridevirtual |
Drop a namespace.
| ns | the namespace to drop |
Implements iceberg::Catalog.
|
overridevirtual |
Drop a table; optionally delete data and metadata files.
If purge is set to true the implementation should delete all data and metadata files.
| identifier | a table identifier |
| purge | if true, delete all data and metadata files in the table |
Implements iceberg::Catalog.
|
overridevirtual |
Get metadata properties for a namespace.
| ns | the namespace to look up |
Implements iceberg::Catalog.
|
overridevirtual |
List child namespaces from the given namespace.
| ns | the parent namespace |
Implements iceberg::Catalog.
|
overridevirtual |
Return all the identifiers under this namespace.
| ns | a namespace |
Implements iceberg::Catalog.
|
overridevirtual |
Load a table.
| identifier | a table identifier |
FIXME: support per-table FileIO creation
Implements iceberg::Catalog.
|
overridevirtual |
Return the name for this catalog.
Implements iceberg::Catalog.
|
overridevirtual |
Check whether the namespace exists.
| ns | the namespace to check |
Implements iceberg::Catalog.
|
overridevirtual |
Register a table with the catalog if it does not exist.
| identifier | a table identifier |
| metadata_file_location | the location of a metadata file |
Implements iceberg::Catalog.
|
overridevirtual |
Rename a table.
| from | the current table identifier |
| to | the new table identifier |
Implements iceberg::Catalog.
|
overridevirtual |
Start a transaction to create a table.
| identifier | a table identifier |
| schema | a schema |
| spec | a partition spec |
| order | a sort order |
| location | a location for the table; leave empty if unspecified |
| properties | a string map of table properties |
Implements iceberg::Catalog.
|
overridevirtual |
Check whether table exists.
| identifier | a table identifier |
Implements iceberg::Catalog.
|
overridevirtual |
Update a namespace's properties by applying additions and removals.
| ns | the namespace to update |
| updates | a set of properties to add or overwrite |
| removals | a set of property keys to remove |
Implements iceberg::Catalog.
|
overridevirtual |
Update a table.
| identifier | a table identifier |
| requirements | a list of table requirements |
| updates | a list of table updates |
Implements iceberg::Catalog.