-
Notifications
You must be signed in to change notification settings - Fork 129
docs(sample): add custom retry algo samples #3948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
|
The sample and test will not build since the version of the sdk that the samples refer to has not been updated to include the PR that introduced the custom exception handler. This should be fixed when the samples are updated to refer to the latest version of the sdk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
| public class SetCustomRetryAlgorithm { | ||
| // In order to use a custom retry algorithm, you must implement a custom | ||
| // Interceptor that implements the ExceptionHandler.Interceptor interface. | ||
| public static final ExceptionHandler.Interceptor EXCEPTION_HANDLER_INTERCEPTOR = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify this by using the publicly available one at:
https://github.com/googleapis/sdk-platform-java/blob/f18318660c05d0d8466e3ead7127f0747fac2e2e/java-core/google-cloud-core/src/main/java/com/google/cloud/BaseService.java#L30
Just mentions that they can optionally implement their own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah didn't know about this one, thanks! I put in a comment explaining how to implement your own.
samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java
Outdated
Show resolved
Hide resolved
|
Just realized, you might want to change the PR title to: |
samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java
Outdated
Show resolved
Hide resolved
|
/gcbrun |
No description provided.