public abstract class InsertRetryPolicy
extends java.lang.Object
implements java.io.Serializable
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.
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 FormModifier and Type | Class and Description |
---|---|
static class |
InsertRetryPolicy.Context
Contains information about a failed insert.
|
Constructor and Description |
---|
InsertRetryPolicy() |
Modifier and Type | Method and Description |
---|---|
static InsertRetryPolicy |
alwaysRetry()
Always retry all failures.
|
static InsertRetryPolicy |
neverRetry()
Never retry any failures.
|
static InsertRetryPolicy |
retryTransientErrors()
Retry all failures except for known persistent errors.
|
abstract boolean |
shouldRetry(InsertRetryPolicy.Context context)
Return true if this failure should be retried.
|
public abstract boolean shouldRetry(InsertRetryPolicy.Context context)
public static InsertRetryPolicy neverRetry()
public static InsertRetryPolicy alwaysRetry()
public static InsertRetryPolicy retryTransientErrors()