Skip to content

Commit

Permalink
Set retry policy to DEFAULT_RETRY when initializing BlobWriter. (#31468)
Browse files Browse the repository at this point in the history
* Set retry policy to DEFAULT_RETRY when initializing BlobWriter.

* Fix lint

* Fix import according to reviewer feedback.
  • Loading branch information
shunping authored Jun 1, 2024
1 parent f93a67a commit 51525d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdks/python/apache_beam/io/gcp/gcsio.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from google.cloud.exceptions import NotFound
from google.cloud.storage.fileio import BlobReader
from google.cloud.storage.fileio import BlobWriter
from google.cloud.storage.retry import DEFAULT_RETRY

from apache_beam import version as beam_version
from apache_beam.internal.gcp import auth
Expand Down Expand Up @@ -542,5 +543,6 @@ def __init__(
blob,
content_type=content_type,
chunk_size=chunk_size,
ignore_flush=ignore_flush)
ignore_flush=ignore_flush,
retry=DEFAULT_RETRY)
self.mode = "w"

0 comments on commit 51525d3

Please sign in to comment.