tanmayrauth commented on code in PR #1430:
URL: https://github.com/apache/iceberg-go/pull/1430#discussion_r3560667965
##########
catalog/hive/hive.go:
##########
@@ -149,12 +150,18 @@ func (c *Catalog) LoadTable(ctx context.Context,
identifier table.Identifier) (*
return nil, fmt.Errorf("failed to get metadata location: %w",
err)
}
+ reporter, err := metrics.FromProperties(c.opts.props)
Review Comment:
Agreed this should be pinned. For this PR I've kept it per-op since the
built-ins are stateless and there's no Closer path yet — but the intended shape
is a per-catalog cached reporter matching Java, once a stateful reporter
(connection/buffer/pool) shows up. Happy to do the per-catalog caching in this
PR instead if you'd rather lock it down now; just say the word.
##########
catalog/sql/sql.go:
##########
@@ -434,12 +435,18 @@ func (c *Catalog) LoadTable(ctx context.Context,
identifier table.Identifier) (*
return nil, fmt.Errorf("%w: %s, metadata location is missing",
catalog.ErrNoSuchTable, identifier)
}
+ reporter, err := metrics.FromProperties(c.props)
Review Comment:
Wrapped as fmt.Errorf("failed to initialize metrics reporter: %w", err), and
applied the same at the glue/hadoop/hive/rest sites so a typo'd reporter name
surfaces with context.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]