Class InsertRetryPolicy
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigquery.InsertRetryPolicy
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class InsertRetryPolicy extends java.lang.Object implements java.io.SerializableA 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
RuntimeExceptionand 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInsertRetryPolicy.ContextContains information about a failed insert.
-
Constructor Summary
Constructors Constructor Description InsertRetryPolicy()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static InsertRetryPolicyalwaysRetry()Always retry all failures.static InsertRetryPolicyneverRetry()Never retry any failures.static InsertRetryPolicyretryTransientErrors()Retry all failures except for known persistent errors.abstract booleanshouldRetry(InsertRetryPolicy.Context context)Return true if this failure should be retried.
-
-
-
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.
-
-