You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/10/20 12:08:27 UTC

[GitHub] [iceberg] hililiwei commented on a diff in pull request #6023: Core: Don't fail scan planning if REST metric reporting fails

hililiwei commented on code in PR #6023:
URL: https://github.com/apache/iceberg/pull/6023#discussion_r1000540283


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -304,12 +304,16 @@ private void reportMetrics(
       MetricsReport report,
       Supplier<Map<String, String>> headers) {
     reporter.report(report);
-    client.post(
-        paths.metrics(tableIdentifier),
-        ReportMetricsRequest.of(report),
-        null,
-        headers,
-        ErrorHandlers.defaultErrorHandler());
+    try {
+      client.post(
+          paths.metrics(tableIdentifier),
+          ReportMetricsRequest.of(report),
+          null,
+          headers,
+          ErrorHandlers.defaultErrorHandler());
+    } catch (Exception e) {
+      LOG.warn("Failed to report metrics to REST endpoint for table {}", tableIdentifier, e);

Review Comment:
   nit: Print out the details of the report?



-- 
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