You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/10/20 23:59:23 UTC

[iceberg] branch master updated: Core: Avoid scan planning failure if REST metric reporting fails (#6023)

This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new d3d9059578 Core: Avoid scan planning failure if REST metric reporting fails (#6023)
d3d9059578 is described below

commit d3d90595788620f8396058a4639a5ab4d95cea5c
Author: Eduard Tudenhöfner <et...@gmail.com>
AuthorDate: Fri Oct 21 01:59:17 2022 +0200

    Core: Avoid scan planning failure if REST metric reporting fails (#6023)
---
 .../java/org/apache/iceberg/rest/RESTSessionCatalog.java | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java b/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
index 6ec8f442ee..44e3aba822 100644
--- a/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
+++ b/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java
@@ -304,12 +304,16 @@ public class RESTSessionCatalog extends BaseSessionCatalog
       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);
+    }
   }
 
   @Override