Class BigQueryStorageSettings
java.lang.Object
com.google.api.gax.rpc.ClientSettings<BigQueryStorageSettings>
com.google.cloud.bigquery.storage.v1beta1.BigQueryStorageSettings
Settings class to configure an instance of
BigQueryStorageClient.
The default instance has everything set to sensible defaults:
- The default service address (bigquerystorage.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object. For example, to set the total timeout of createReadSession to 30 seconds:
BigQueryStorageSettings.Builder settingsBuilder = BaseBigQueryStorageSettings.newBuilder();
settingsBuilder.createReadSessionSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30));
BaseBigQueryStorageSettings settings = settingsBuilder.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for BigQueryStorageSettings.static interface -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBigQueryStorageSettings(BigQueryStorageSettings.Builder settingsBuilder) -
Method Summary
Modifier and TypeMethodDescriptionUnaryCallSettings<Storage.BatchCreateReadSessionStreamsRequest,Storage.BatchCreateReadSessionStreamsResponse> Returns the object with the settings used for calls to batchCreateReadSessionStreams.static final BigQueryStorageSettingscreate(EnhancedBigQueryStorageStubSettings settings) Returns the object with the settings used for calls to createReadSession.Returns a builder for the default credentials for this service.Returns a builder for the default ExecutorProvider for this service.Returns a builder for the default ChannelProvider for this service.static TransportChannelProviderUnaryCallSettings<Storage.FinalizeStreamRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to finalizeStream.static StringReturns the default service endpoint.Returns the default service scopes.Returns a new builder for this class.newBuilder(ClientContext clientContext) Returns a new builder for this class.Returns the object with the settings used for calls to readRows.voidsetReadRowsRetryAttemptListener(BigQueryStorageSettings.RetryAttemptListener readRowsRetryAttemptListener) If a non null readRowsRetryAttemptListener is provided, client will call onRetryAttempt function before a failed ReadRows request is retried.Returns the object with the settings used for calls to splitReadStream.Returns a builder containing all the values of this settings class.Methods inherited from class com.google.api.gax.rpc.ClientSettings
getApiKey, getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getGdchApiAudience, getHeaderProvider, getInternalHeaderProvider, getQuotaProjectId, getStubSettings, getTransportChannelProvider, getUniverseDomain, getWatchdogCheckInterval, getWatchdogCheckIntervalDuration, getWatchdogProvider, toString
-
Constructor Details
-
BigQueryStorageSettings
protected BigQueryStorageSettings(BigQueryStorageSettings.Builder settingsBuilder) throws IOException - Throws:
IOException
-
-
Method Details
-
createReadSessionSettings
public UnaryCallSettings<Storage.CreateReadSessionRequest,Storage.ReadSession> createReadSessionSettings()Returns the object with the settings used for calls to createReadSession. -
readRowsSettings
public ServerStreamingCallSettings<Storage.ReadRowsRequest,Storage.ReadRowsResponse> readRowsSettings()Returns the object with the settings used for calls to readRows. -
setReadRowsRetryAttemptListener
public void setReadRowsRetryAttemptListener(BigQueryStorageSettings.RetryAttemptListener readRowsRetryAttemptListener) If a non null readRowsRetryAttemptListener is provided, client will call onRetryAttempt function before a failed ReadRows request is retried. This can be used as negative feedback mechanism for future decision to split read streams because some retried failures are due to resource exhaustion that increased parallelism only makes it worse. -
getReadRowsRetryAttemptListener
-
batchCreateReadSessionStreamsSettings
public UnaryCallSettings<Storage.BatchCreateReadSessionStreamsRequest,Storage.BatchCreateReadSessionStreamsResponse> batchCreateReadSessionStreamsSettings()Returns the object with the settings used for calls to batchCreateReadSessionStreams. -
finalizeStreamSettings
public UnaryCallSettings<Storage.FinalizeStreamRequest,com.google.protobuf.Empty> finalizeStreamSettings()Returns the object with the settings used for calls to finalizeStream. -
splitReadStreamSettings
public UnaryCallSettings<Storage.SplitReadStreamRequest,Storage.SplitReadStreamResponse> splitReadStreamSettings()Returns the object with the settings used for calls to splitReadStream. -
create
public static final BigQueryStorageSettings create(EnhancedBigQueryStorageStubSettings settings) throws IOException - Throws:
IOException
-
defaultExecutorProviderBuilder
Returns a builder for the default ExecutorProvider for this service. -
getDefaultEndpoint
Returns the default service endpoint. -
getDefaultServiceScopes
Returns the default service scopes. -
defaultCredentialsProviderBuilder
Returns a builder for the default credentials for this service. -
defaultGrpcTransportProviderBuilder
Returns a builder for the default ChannelProvider for this service. -
defaultTransportChannelProvider
-
defaultApiClientHeaderProviderBuilder
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() -
newBuilder
Returns a new builder for this class. -
newBuilder
Returns a new builder for this class. -
toBuilder
Returns a builder containing all the values of this settings class.- Specified by:
toBuilderin classClientSettings<BigQueryStorageSettings>
-