3737#include " iceberg/catalog/rest/rest_util.h"
3838#include " iceberg/catalog/rest/types.h"
3939#include " iceberg/json_serde_internal.h"
40- #include " iceberg/metrics/metrics_reporters.h"
4140#include " iceberg/partition_spec.h"
4241#include " iceberg/result.h"
4342#include " iceberg/schema.h"
@@ -169,17 +168,10 @@ Result<std::shared_ptr<RestCatalog>> RestCatalog::Make(
169168 ICEBERG_ASSIGN_OR_RAISE (auto catalog_session,
170169 auth_manager->CatalogSession (*client, final_config.configs ()));
171170
172- // Load metrics reporter from catalog properties
173- std::shared_ptr<MetricsReporter> reporter;
174- auto reporter_result = MetricsReporters::Load (final_config.configs ());
175- if (reporter_result.has_value ()) {
176- reporter = std::move (reporter_result.value ());
177- }
178-
179171 return std::shared_ptr<RestCatalog>(
180172 new RestCatalog (std::move (final_config), std::move (file_io), std::move (client),
181173 std::move (paths), std::move (endpoints), std::move (auth_manager),
182- std::move (catalog_session), std::move (reporter), snapshot_mode));
174+ std::move (catalog_session), snapshot_mode));
183175}
184176
185177RestCatalog::RestCatalog (RestCatalogProperties config, std::shared_ptr<FileIO> file_io,
@@ -188,7 +180,6 @@ RestCatalog::RestCatalog(RestCatalogProperties config, std::shared_ptr<FileIO> f
188180 std::unordered_set<Endpoint> endpoints,
189181 std::unique_ptr<auth::AuthManager> auth_manager,
190182 std::shared_ptr<auth::AuthSession> catalog_session,
191- std::shared_ptr<MetricsReporter> reporter,
192183 SnapshotMode snapshot_mode)
193184 : config_(std::move(config)),
194185 file_io_ (std::move(file_io)),
@@ -198,7 +189,6 @@ RestCatalog::RestCatalog(RestCatalogProperties config, std::shared_ptr<FileIO> f
198189 supported_endpoints_(std::move(endpoints)),
199190 auth_manager_(std::move(auth_manager)),
200191 catalog_session_(std::move(catalog_session)),
201- reporter_(std::move(reporter)),
202192 snapshot_mode_(snapshot_mode) {
203193 ICEBERG_DCHECK (catalog_session_ != nullptr , " catalog_session must not be null" );
204194}
@@ -365,8 +355,7 @@ Result<std::shared_ptr<Table>> RestCatalog::CreateTable(
365355 CreateTableInternal (identifier, schema, spec, order, location,
366356 properties, /* stage_create=*/ false ));
367357 return Table::Make (identifier, std::move (result.metadata ),
368- std::move (result.metadata_location ), file_io_, shared_from_this (),
369- reporter_);
358+ std::move (result.metadata_location ), file_io_, shared_from_this ());
370359}
371360
372361Result<std::shared_ptr<Table>> RestCatalog::UpdateTable (
@@ -397,7 +386,7 @@ Result<std::shared_ptr<Table>> RestCatalog::UpdateTable(
397386
398387 return Table::Make (identifier, std::move (commit_response.metadata ),
399388 std::move (commit_response.metadata_location ), file_io_,
400- shared_from_this (), reporter_ );
389+ shared_from_this ());
401390}
402391
403392Result<std::shared_ptr<Transaction>> RestCatalog::StageCreateTable (
@@ -411,7 +400,7 @@ Result<std::shared_ptr<Transaction>> RestCatalog::StageCreateTable(
411400 ICEBERG_ASSIGN_OR_RAISE (auto staged_table,
412401 StagedTable::Make (identifier, std::move (result.metadata ),
413402 std::move (result.metadata_location ), file_io_,
414- shared_from_this (), reporter_ ));
403+ shared_from_this ()));
415404 return Transaction::Make (std::move (staged_table), TransactionKind::kCreate );
416405}
417406
@@ -480,7 +469,7 @@ Result<std::shared_ptr<Table>> RestCatalog::LoadTable(const TableIdentifier& ide
480469 ICEBERG_ASSIGN_OR_RAISE (auto load_result, LoadTableResultFromJson (json));
481470 return Table::Make (identifier, std::move (load_result.metadata ),
482471 std::move (load_result.metadata_location ), file_io_,
483- shared_from_this (), reporter_ );
472+ shared_from_this ());
484473}
485474
486475Result<std::shared_ptr<Table>> RestCatalog::RegisterTable (
@@ -503,7 +492,7 @@ Result<std::shared_ptr<Table>> RestCatalog::RegisterTable(
503492 ICEBERG_ASSIGN_OR_RAISE (auto load_result, LoadTableResultFromJson (json));
504493 return Table::Make (identifier, std::move (load_result.metadata ),
505494 std::move (load_result.metadata_location ), file_io_,
506- shared_from_this (), reporter_ );
495+ shared_from_this ());
507496}
508497
509498} // namespace iceberg::rest
0 commit comments