Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

docs(sample): add custom retry algo samples#3948

Closed
whuffman36 wants to merge 6 commits intomainfrom
retry-sample
Closed

docs(sample): add custom retry algo samples#3948
whuffman36 wants to merge 6 commits intomainfrom
retry-sample

Conversation

@whuffman36
Copy link
Copy Markdown
Contributor

No description provided.

@whuffman36 whuffman36 self-assigned this Sep 3, 2025
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/java-bigquery API. samples Issues that are directly related to samples. labels Sep 3, 2025
@whuffman36 whuffman36 marked this pull request as ready for review September 3, 2025 19:34
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Sep 3, 2025

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@whuffman36
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

@PhongChuong PhongChuong left a 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 =
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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.

Comment thread samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java Outdated
Comment thread samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java Outdated
@PhongChuong
Copy link
Copy Markdown
Contributor

Just realized, you might want to change the PR title to:
docs(sample): add custom retry algo samples
So it doesn't bump the semantic version.

@whuffman36 whuffman36 changed the title feat(bigquery): implement custom retry algo samples docs(sample): add custom retry algo samples Sep 4, 2025
Comment thread samples/snippets/src/main/java/com/example/bigquery/SetCustomRetryAlgorithm.java Outdated
@PhongChuong
Copy link
Copy Markdown
Contributor

/gcbrun

@chingor13 chingor13 closed this Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/java-bigquery API. samples Issues that are directly related to samples. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants