singhpk234 commented on code in PR #17904:
URL: https://github.com/apache/iceberg/pull/17904#discussion_r3905271783
##########
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:
if not lets follow the exception message pattern for this exception
##########
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:
can we avoid this ?
--
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]