Class InsertRetryPolicy

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class InsertRetryPolicy
    extends java.lang.Object
    implements java.io.Serializable
    A retry policy for streaming BigQuery inserts.

    This retry policy currently applies only to per-element errors within successful (200 OK) BigQuery responses. Non-200 responses (e.g., 400 Bad Request, 500 Internal Server Error) will result in a RuntimeException and bundle failure. The subsequent handling of the failed bundle (e.g., retry or final failure) is determined by the specific Runner's fault tolerance mechanisms.

    See Also:
    BigQueryServicesImpl.DatasetServiceImpl.insertAll( TableReference, java.util.List, java.util.List, BackOff, org.apache.beam.sdk.util.FluentBackoff, Sleeper, org.apache.beam.sdk.io.gcp.bigquery.InsertRetryPolicy, java.util.List, org.apache.beam.sdk.io.gcp.bigquery.ErrorContainer, boolean, boolean, boolean, java.util.List), Serialized Form
    • Constructor Detail

      • InsertRetryPolicy

        public InsertRetryPolicy()
    • Method Detail

      • shouldRetry

        public abstract boolean shouldRetry​(InsertRetryPolicy.Context context)
        Return true if this failure should be retried.
      • neverRetry

        public static InsertRetryPolicy neverRetry()
        Never retry any failures.
      • alwaysRetry

        public static InsertRetryPolicy alwaysRetry()
        Always retry all failures.
      • retryTransientErrors

        public static InsertRetryPolicy retryTransientErrors()
        Retry all failures except for known persistent errors.