damansingh1313 commented on code in PR #17904:
URL: https://github.com/apache/iceberg/pull/17904#discussion_r3906546005


##########
bigquery/src/main/java/org/apache/iceberg/gcp/bigquery/BigQueryMetastoreClientImpl.java:
##########
@@ -637,6 +572,28 @@ private static HttpResponse 
convertExceptionIfUnsuccessful(HttpResponse response
     }
   }
 
+  /**
+   * Executes the given callable through {@link BigQueryRetryHelper} with this 
client's configured
+   * retry settings, translating a {@link 
BigQueryRetryHelper.BigQueryRetryHelperException} into the
+   * underlying runtime exception.
+   */
+  private <T> T runWithRetries(Callable<T> callable) {
+    try {
+      return BigQueryRetryHelper.runWithRetries(
+          callable,
+          bigqueryOptions.getRetrySettings(),
+          BIGQUERY_EXCEPTION_HANDLER,
+          bigqueryOptions.getClock(),
+          DEFAULT_RETRY_CONFIG,
+          bigqueryOptions.isOpenTelemetryTracingEnabled(),
+          bigqueryOptions.getOpenTelemetryTracer());
+    } catch (BigQueryRetryHelper.BigQueryRetryHelperException e) {
+      handleBigQueryRetryException(e);
+      throw new IllegalStateException(
+          "handleBigQueryRetryException must throw for 
BigQueryRetryHelperException", e);

Review Comment:
   Thanks for the review! It is addressed in 1ce7935: asRuntimeException now 
returns the exception and the catch throws it directly, so the unreachable 
IllegalStateException is gone.



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

Reply via email to