Class SpannerConfig
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.SpannerConfig
- All Implemented Interfaces:
Serializable
Configuration for a Cloud Spanner client.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpannerConfig
create()
abstract @Nullable ValueProvider
<Duration> abstract @Nullable com.google.api.gax.retrying.RetrySettings
abstract @Nullable ValueProvider
<com.google.auth.Credentials> abstract @Nullable ValueProvider
<String> abstract @Nullable ValueProvider
<String> abstract @Nullable ValueProvider
<Boolean> abstract @Nullable ValueProvider
<String> abstract @Nullable com.google.api.gax.retrying.RetrySettings
abstract @Nullable ValueProvider
<String> getHost()
abstract @Nullable ValueProvider
<String> abstract @Nullable ValueProvider
<Boolean> abstract @Nullable ValueProvider
<Duration> abstract @Nullable ValueProvider
<Duration> abstract @Nullable ValueProvider
<Duration> abstract @Nullable ValueProvider
<Duration> abstract @Nullable ValueProvider
<String> abstract @Nullable org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet
<com.google.api.gax.rpc.StatusCode.Code> abstract @Nullable ValueProvider
<Options.RpcPriority> void
populateDisplayData
(DisplayData.Builder builder) void
validate()
withCommitDeadline
(ValueProvider<Duration> commitDeadline) Specifies the commit deadline.withCommitDeadline
(Duration commitDeadline) Specifies the commit deadline.withCommitRetrySettings
(com.google.api.gax.retrying.RetrySettings commitRetrySettings) Specifies the commit retry settings.withCredentials
(com.google.auth.Credentials credentials) Specifies the credentials.withCredentials
(ValueProvider<com.google.auth.Credentials> credentials) Specifies the credentials.withDatabaseId
(String databaseId) Specifies the Cloud Spanner database ID.withDatabaseId
(ValueProvider<String> databaseId) Specifies the Cloud Spanner database ID.withDatabaseRole
(ValueProvider<String> databaseRole) Specifies the Cloud Spanner database role.withDataBoostEnabled
(ValueProvider<Boolean> dataBoostEnabled) Specifies if the pipeline has to be run on the independent compute resource.withEmulatorHost
(ValueProvider<String> emulatorHost) Specifies the Cloud Spanner host, when an emulator is used.withExecuteStreamingSqlRetrySettings
(com.google.api.gax.retrying.RetrySettings executeStreamingSqlRetrySettings) Specifies the ExecuteStreamingSql retry settings.withHost
(ValueProvider<String> host) Specifies the Cloud Spanner host.withInstanceId
(String instanceId) Specifies the Cloud Spanner instance ID.withInstanceId
(ValueProvider<String> instanceId) Specifies the Cloud Spanner instance ID.withIsLocalChannelProvider
(ValueProvider<Boolean> isLocalChannelProvider) Specifies whether a local channel provider should be used.withMaxCommitDelay
(long millis) withMaxCommitDelay
(ValueProvider<Duration> maxCommitDelay) Specifies the max commit delay for high throughput writes.withMaxCommitDelay
(Duration maxCommitDelay) Specifies the max commit delay for high throughput writes.withMaxCumulativeBackoff
(ValueProvider<Duration> maxCumulativeBackoff) Specifies the maximum cumulative backoff.withMaxCumulativeBackoff
(Duration maxCumulativeBackoff) Specifies the maximum cumulative backoff.withPartitionQueryTimeout
(ValueProvider<Duration> partitionQueryTimeout) Specifies the PartitionQuery timeout.withPartitionQueryTimeout
(Duration partitionQueryTimeout) Specifies the PartitionQuery timeout.withPartitionReadTimeout
(ValueProvider<Duration> partitionReadTimeout) Specifies the PartitionRead timeout.withPartitionReadTimeout
(Duration partitionReadTimeout) Specifies the PartitionRead timeout.withProjectId
(String projectId) Specifies the Cloud Spanner project ID.withProjectId
(ValueProvider<String> projectId) Specifies the Cloud Spanner project ID.withRetryableCodes
(org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code> retryableCodes) Specifies the errors that will be retried by the client library for all operations.withRpcPriority
(Options.RpcPriority rpcPriority) Specifies the RPC priority.withRpcPriority
(ValueProvider<Options.RpcPriority> rpcPriority) Specifies the RPC priority.
-
Constructor Details
-
SpannerConfig
public SpannerConfig()
-
-
Method Details
-
getProjectId
-
getInstanceId
-
getDatabaseId
-
getHost
-
getHostValue
-
getEmulatorHost
-
getIsLocalChannelProvider
-
getCommitDeadline
-
getMaxCumulativeBackoff
-
getExecuteStreamingSqlRetrySettings
public abstract @Nullable com.google.api.gax.retrying.RetrySettings getExecuteStreamingSqlRetrySettings() -
getCommitRetrySettings
-
getRetryableCodes
public abstract @Nullable org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code> getRetryableCodes() -
getRpcPriority
-
getMaxCommitDelay
-
getDatabaseRole
-
getPartitionQueryTimeout
-
getPartitionReadTimeout
-
getDataBoostEnabled
-
getCredentials
-
create
-
validate
public void validate() -
populateDisplayData
-
withProjectId
Specifies the Cloud Spanner project ID. -
withProjectId
Specifies the Cloud Spanner project ID. -
withInstanceId
Specifies the Cloud Spanner instance ID. -
withInstanceId
Specifies the Cloud Spanner instance ID. -
withDatabaseId
Specifies the Cloud Spanner database ID. -
withDatabaseId
Specifies the Cloud Spanner database ID. -
withHost
Specifies the Cloud Spanner host. -
withEmulatorHost
Specifies the Cloud Spanner host, when an emulator is used. -
withIsLocalChannelProvider
Specifies whether a local channel provider should be used. This should be set to True when an emulator is used. -
withCommitDeadline
Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified. -
withCommitDeadline
Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified. -
withMaxCumulativeBackoff
Specifies the maximum cumulative backoff. -
withMaxCumulativeBackoff
Specifies the maximum cumulative backoff. -
withExecuteStreamingSqlRetrySettings
public SpannerConfig withExecuteStreamingSqlRetrySettings(com.google.api.gax.retrying.RetrySettings executeStreamingSqlRetrySettings) Specifies the ExecuteStreamingSql retry settings. If not set, the default timeout is set to 2 hours. -
withCommitRetrySettings
public SpannerConfig withCommitRetrySettings(com.google.api.gax.retrying.RetrySettings commitRetrySettings) Specifies the commit retry settings. Setting this overrides the commit deadline. -
withRetryableCodes
public SpannerConfig withRetryableCodes(org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code> retryableCodes) Specifies the errors that will be retried by the client library for all operations. -
withRpcPriority
Specifies the RPC priority. -
withRpcPriority
Specifies the RPC priority. -
withMaxCommitDelay
-
withMaxCommitDelay
Specifies the max commit delay for high throughput writes. -
withMaxCommitDelay
Specifies the max commit delay for high throughput writes. -
withDatabaseRole
Specifies the Cloud Spanner database role. -
withDataBoostEnabled
Specifies if the pipeline has to be run on the independent compute resource. -
withPartitionQueryTimeout
Specifies the PartitionQuery timeout. -
withPartitionQueryTimeout
Specifies the PartitionQuery timeout. -
withPartitionReadTimeout
Specifies the PartitionRead timeout. -
withPartitionReadTimeout
Specifies the PartitionRead timeout. -
withCredentials
Specifies the credentials. -
withCredentials
Specifies the credentials.
-