You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2023/08/21 08:37:17 UTC
[GitHub] [iceberg] nastra commented on a diff in pull request #8359: FileIO: Skip stack trace log for missing Hadoop
nastra commented on code in PR #8359:
URL: https://github.com/apache/iceberg/pull/8359#discussion_r1299799167
##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -379,21 +379,23 @@ public void initialize(Map<String, String> props) {
}
}
+ initMetrics(properties);
+ }
+
+ @SuppressWarnings("CatchBlockLogException")
+ private void initMetrics(Map<String, String> props) {
// Report Hadoop metrics if Hadoop is available
try {
DynConstructors.Ctor<MetricsContext> ctor =
DynConstructors.builder(MetricsContext.class)
- .loader(S3FileIO.class.getClassLoader())
.hiddenImpl(DEFAULT_METRICS_IMPL, String.class)
.buildChecked();
MetricsContext context = ctor.newInstance("s3");
- context.initialize(properties);
+ context.initialize(props);
this.metrics = context;
} catch (NoClassDefFoundError | NoSuchMethodException | ClassCastException e) {
LOG.warn(
- "Unable to load metrics class: '{}', falling back to null metrics",
- DEFAULT_METRICS_IMPL,
- e);
+ "Unable to load metrics class: '{}', falling back to null metrics", DEFAULT_METRICS_IMPL);
Review Comment:
I agree that WARN is more appropriate here than ERROR
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org