Class SpannerConfig
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.SpannerConfig
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class SpannerConfig extends java.lang.Object implements java.io.SerializableConfiguration for a Cloud Spanner client.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpannerConfig.BuilderBuilder forSpannerConfig.
-
Constructor Summary
Constructors Constructor Description SpannerConfig()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SpannerConfigcreate()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration>getCommitDeadline()abstract @Nullable com.google.api.gax.retrying.RetrySettingsgetCommitRetrySettings()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials>getCredentials()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getDatabaseId()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getDatabaseRole()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean>getDataBoostEnabled()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getEmulatorHost()abstract @Nullable com.google.api.gax.retrying.RetrySettingsgetExecuteStreamingSqlRetrySettings()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getHost()java.lang.StringgetHostValue()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getInstanceId()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean>getIsLocalChannelProvider()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration>getMaxCommitDelay()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration>getMaxCumulativeBackoff()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration>getPartitionQueryTimeout()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration>getPartitionReadTimeout()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String>getProjectId()abstract @Nullable org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet<com.google.api.gax.rpc.StatusCode.Code>getRetryableCodes()abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority>getRpcPriority()voidpopulateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)voidvalidate()SpannerConfigwithCommitDeadline(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> commitDeadline)Specifies the commit deadline.SpannerConfigwithCommitDeadline(org.joda.time.Duration commitDeadline)Specifies the commit deadline.SpannerConfigwithCommitRetrySettings(com.google.api.gax.retrying.RetrySettings commitRetrySettings)Specifies the commit retry settings.SpannerConfigwithCredentials(com.google.auth.Credentials credentials)Specifies the credentials.SpannerConfigwithCredentials(org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials> credentials)Specifies the credentials.SpannerConfigwithDatabaseId(java.lang.String databaseId)Specifies the Cloud Spanner database ID.SpannerConfigwithDatabaseId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseId)Specifies the Cloud Spanner database ID.SpannerConfigwithDatabaseRole(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseRole)Specifies the Cloud Spanner database role.SpannerConfigwithDataBoostEnabled(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> dataBoostEnabled)Specifies if the pipeline has to be run on the independent compute resource.SpannerConfigwithEmulatorHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> emulatorHost)Specifies the Cloud Spanner host, when an emulator is used.SpannerConfigwithExecuteStreamingSqlRetrySettings(com.google.api.gax.retrying.RetrySettings executeStreamingSqlRetrySettings)Specifies the ExecuteStreamingSql retry settings.SpannerConfigwithHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)Specifies the Cloud Spanner host.SpannerConfigwithInstanceId(java.lang.String instanceId)Specifies the Cloud Spanner instance ID.SpannerConfigwithInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)Specifies the Cloud Spanner instance ID.SpannerConfigwithIsLocalChannelProvider(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> isLocalChannelProvider)Specifies whether a local channel provider should be used.SpannerConfigwithMaxCommitDelay(long millis)SpannerConfigwithMaxCommitDelay(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCommitDelay)Specifies the max commit delay for high throughput writes.SpannerConfigwithMaxCommitDelay(org.joda.time.Duration maxCommitDelay)Specifies the max commit delay for high throughput writes.SpannerConfigwithMaxCumulativeBackoff(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCumulativeBackoff)Specifies the maximum cumulative backoff.SpannerConfigwithMaxCumulativeBackoff(org.joda.time.Duration maxCumulativeBackoff)Specifies the maximum cumulative backoff.SpannerConfigwithPartitionQueryTimeout(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionQueryTimeout)Specifies the PartitionQuery timeout.SpannerConfigwithPartitionQueryTimeout(org.joda.time.Duration partitionQueryTimeout)Specifies the PartitionQuery timeout.SpannerConfigwithPartitionReadTimeout(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionReadTimeout)Specifies the PartitionRead timeout.SpannerConfigwithPartitionReadTimeout(org.joda.time.Duration partitionReadTimeout)Specifies the PartitionRead timeout.SpannerConfigwithProjectId(java.lang.String projectId)Specifies the Cloud Spanner project ID.SpannerConfigwithProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)Specifies the Cloud Spanner project ID.SpannerConfigwithRetryableCodes(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.SpannerConfigwithRpcPriority(com.google.cloud.spanner.Options.RpcPriority rpcPriority)Specifies the RPC priority.SpannerConfigwithRpcPriority(org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority> rpcPriority)Specifies the RPC priority.
-
-
-
Method Detail
-
getProjectId
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getProjectId()
-
getInstanceId
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getInstanceId()
-
getDatabaseId
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getDatabaseId()
-
getHost
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getHost()
-
getHostValue
public java.lang.String getHostValue()
-
getEmulatorHost
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getEmulatorHost()
-
getIsLocalChannelProvider
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> getIsLocalChannelProvider()
-
getCommitDeadline
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getCommitDeadline()
-
getMaxCumulativeBackoff
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getMaxCumulativeBackoff()
-
getExecuteStreamingSqlRetrySettings
public abstract @Nullable com.google.api.gax.retrying.RetrySettings getExecuteStreamingSqlRetrySettings()
-
getCommitRetrySettings
public abstract @Nullable com.google.api.gax.retrying.RetrySettings 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
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority> getRpcPriority()
-
getMaxCommitDelay
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getMaxCommitDelay()
-
getDatabaseRole
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.String> getDatabaseRole()
-
getPartitionQueryTimeout
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getPartitionQueryTimeout()
-
getPartitionReadTimeout
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> getPartitionReadTimeout()
-
getDataBoostEnabled
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> getDataBoostEnabled()
-
getCredentials
public abstract @Nullable org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials> getCredentials()
-
create
public static SpannerConfig create()
-
validate
public void validate()
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
-
withProjectId
public SpannerConfig withProjectId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> projectId)
Specifies the Cloud Spanner project ID.
-
withProjectId
public SpannerConfig withProjectId(java.lang.String projectId)
Specifies the Cloud Spanner project ID.
-
withInstanceId
public SpannerConfig withInstanceId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> instanceId)
Specifies the Cloud Spanner instance ID.
-
withInstanceId
public SpannerConfig withInstanceId(java.lang.String instanceId)
Specifies the Cloud Spanner instance ID.
-
withDatabaseId
public SpannerConfig withDatabaseId(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseId)
Specifies the Cloud Spanner database ID.
-
withDatabaseId
public SpannerConfig withDatabaseId(java.lang.String databaseId)
Specifies the Cloud Spanner database ID.
-
withHost
public SpannerConfig withHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)
Specifies the Cloud Spanner host.
-
withEmulatorHost
public SpannerConfig withEmulatorHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> emulatorHost)
Specifies the Cloud Spanner host, when an emulator is used.
-
withIsLocalChannelProvider
public SpannerConfig withIsLocalChannelProvider(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> isLocalChannelProvider)
Specifies whether a local channel provider should be used. This should be set to True when an emulator is used.
-
withCommitDeadline
public SpannerConfig withCommitDeadline(org.joda.time.Duration commitDeadline)
Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified.
-
withCommitDeadline
public SpannerConfig withCommitDeadline(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> commitDeadline)
Specifies the commit deadline. This is overridden if the CommitRetrySettings is specified.
-
withMaxCumulativeBackoff
public SpannerConfig withMaxCumulativeBackoff(org.joda.time.Duration maxCumulativeBackoff)
Specifies the maximum cumulative backoff.
-
withMaxCumulativeBackoff
public SpannerConfig withMaxCumulativeBackoff(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCumulativeBackoff)
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
public SpannerConfig withRpcPriority(com.google.cloud.spanner.Options.RpcPriority rpcPriority)
Specifies the RPC priority.
-
withRpcPriority
public SpannerConfig withRpcPriority(org.apache.beam.sdk.options.ValueProvider<com.google.cloud.spanner.Options.RpcPriority> rpcPriority)
Specifies the RPC priority.
-
withMaxCommitDelay
public SpannerConfig withMaxCommitDelay(long millis)
-
withMaxCommitDelay
public SpannerConfig withMaxCommitDelay(org.joda.time.Duration maxCommitDelay)
Specifies the max commit delay for high throughput writes.
-
withMaxCommitDelay
public SpannerConfig withMaxCommitDelay(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> maxCommitDelay)
Specifies the max commit delay for high throughput writes.
-
withDatabaseRole
public SpannerConfig withDatabaseRole(org.apache.beam.sdk.options.ValueProvider<java.lang.String> databaseRole)
Specifies the Cloud Spanner database role.
-
withDataBoostEnabled
public SpannerConfig withDataBoostEnabled(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> dataBoostEnabled)
Specifies if the pipeline has to be run on the independent compute resource.
-
withPartitionQueryTimeout
public SpannerConfig withPartitionQueryTimeout(org.joda.time.Duration partitionQueryTimeout)
Specifies the PartitionQuery timeout.
-
withPartitionQueryTimeout
public SpannerConfig withPartitionQueryTimeout(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionQueryTimeout)
Specifies the PartitionQuery timeout.
-
withPartitionReadTimeout
public SpannerConfig withPartitionReadTimeout(org.joda.time.Duration partitionReadTimeout)
Specifies the PartitionRead timeout.
-
withPartitionReadTimeout
public SpannerConfig withPartitionReadTimeout(org.apache.beam.sdk.options.ValueProvider<org.joda.time.Duration> partitionReadTimeout)
Specifies the PartitionRead timeout.
-
withCredentials
public SpannerConfig withCredentials(com.google.auth.Credentials credentials)
Specifies the credentials.
-
withCredentials
public SpannerConfig withCredentials(org.apache.beam.sdk.options.ValueProvider<com.google.auth.Credentials> credentials)
Specifies the credentials.
-
-