rdblue commented on code in PR #5215:
URL: https://github.com/apache/iceberg/pull/5215#discussion_r916012419
##########
core/src/main/java/org/apache/iceberg/MetricsConfig.java:
##########
@@ -195,6 +198,16 @@ private static MetricsMode
sortedColumnDefaultMode(MetricsMode defaultMode) {
}
}
+ private static MetricsMode parseMode(String modeString, MetricsMode
fallback, String context) {
+ try {
+ return MetricsModes.fromString(modeString);
+ } catch (IllegalArgumentException err) {
+ // User override was invalid, log the error and use the default
+ LOG.warn("Ignoring invalid metrics mode ({}): {}", context, modeString,
err);
Review Comment:
If the last argument is a Throwable, the logger does the right thing.
--
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]